Notes:Mdm of a discrete distribution lemma
Contents
[hide]UPDATES
Caveats
This all requires that λ≥0 for a start, else floor isn't defined, and α,β≥0 too. I am sure the result is right but PROOFS ARE NEEDED
New statement
We have the following:
- Let α,β∈N0 be given with α≤β (Template:WLOG - swap as required)
- Let f:{α,α+1,…,β−1,β}→R be given
- Let λ∈R be given
The task is to evaluate the following summation:
- S:=β∑k=α|k−λ|f(k)
We claim:
- S=Min(Floor(λ),β)∑k=α(λ−k)f(k)+β∑k=Min(Floor(λ),β)+1(k−λ)f(k)
Proof
We have (sort of) proved the case where β≥Min(Floor(λ),β)+1 already. As in this case the second summation has at least one term. As is convention with summations the ∑bk=ack for b<a is 0.
A complete proof will look something like this:
- Define γ:=Min(Floor(λ),β)
- So we claim that S=γ∑k=α(λ−k)f(k)+β∑k=γ+1(k−λ)f(k)
- So we claim that S=γ∑k=α(λ−k)f(k)+β∑k=γ+1(k−λ)f(k)
Original notes
Page notes
Let X be a distribution defined on Z or a subset, which we will denote A, that is P[X=k] is defined for all k∈A and there is no set of which A is a strict subset with P[X=k] defined for all k within it.
- This definition might be too general.
Statement
Below we show
- for n≥Floor(λ)+1 then:
- n∑k=0|k−λ|f(k)=Floor(λ)∑k=0(λ−k)f(k)+n∑k=Floor(λ)+1(k−λ)f(k)
- n∑k=0|k−λ|f(k)=Floor(λ)∑k=0(λ−k)f(k)+n∑k=Floor(λ)+1(k−λ)f(k)
- if n<Floor(λ)+1 then we need to put like Min(Floor(λ),n) as the end value for the first sum, the modifications are trivial.
We need to modify this slightly for a sum between k=α to k=β say - but this is certainly a good result for now.
- (ORIGINAL STUFF)
Let's just go ahead and state it:
Original statement
Let:
- S:=∞∑k=0|k−λ|f(k)[Note 1]
- We claim:
- S=Floor(λ)∑k=0(λ−k)f(k)+∞∑k=Floor(λ)+1(k−λ)f(k)
- S=Floor(λ)∑k=0(λ−k)f(k)+∞∑k=Floor(λ)+1(k−λ)f(k)
- We claim:
Proof
Let:
- S:=∞∑k=0|k−λ|f(k)
- To evaluate this we must break the range {0,1,2,…,n−1,n,n+1,…} into a region for which
- |k−λ|=k−λ - meaning that k−λ≥0 ⟹k≥λ and
- |k−λ|=λ−k meaning that k−λ≤0 ⟹k≤λ
- When calculating such Mdms we often use the floor function to break the domain, breaking it around Floor(λ)
- To evaluate this we must break the range {0,1,2,…,n−1,n,n+1,…} into a region for which
(Not sure where to take this)
Paper-style proof
Here's what I did on paper:
- I used the "floor corollary"[Note 2] which states:
- (It may have multiple forms, they all basically say the same thing)
- PRIMARY FORM: ∀x∈R≥0[Floor(x)≤x<Floor(x)+1]
- ... the other forms will be slightly more detailed, for example if x∈R≥0−N≥0 then Floor(x)<x<Floor(x)+1
- PRIMARY FORM: ∀x∈R≥0[Floor(x)≤x<Floor(x)+1]
- (It may have multiple forms, they all basically say the same thing)
- We look at the k=0 forward case, and we see that if we sum over k for k from 0 to Floor(λ) that:
- 0≤k≤Floor(λ)≤λ<Floor(λ)+1
- Specifically 0≤k≤Floor(λ)
- So for 0≤k≤Floor(λ)≤λ we see that k≤λ ⟹ k−λ≤0, so:
- for 0≤k≤Floor(λ)≤λ we have λ−k≥0 and thus |k−λ|=|λ−k|=λ−k as λ−k≥0 in this range
- Specifically: 0≤k≤Floor(λ) means |k−λ|=λ−k
- for 0≤k≤Floor(λ)≤λ we have λ−k≥0 and thus |k−λ|=|λ−k|=λ−k as λ−k≥0 in this range
- So Floor(λ)∑k=0|k−λ|f(k)=Floor(λ)∑k=0(λ−k)f(k)- the first part of our sum
- 0≤k≤Floor(λ)≤λ<Floor(λ)+1
- Now suppose we are summing to n for n>Floor(λ) then:
- As λ<Floor(λ)+1≤n we see for the range k∈{Floor(λ)+1, Floor(λ)+2, …, n} we have λ<Floor(λ)+1≤k≤n - specifically λ<k
- So 0<k−λ which we shall write: k−λ>0
- Now if k−λ>0 then |k−λ=k−λ when the λ<k condition holds
- Thus for Floor(λ)+1≤k≤n we have |k−λ|=k−λ
- So n∑k=Floor(λ)+1|k−λ|f(k)=n∑k=Floor(λ)+1(k−λ)f(k)
- As λ<Floor(λ)+1≤n we see for the range k∈{Floor(λ)+1, Floor(λ)+2, …, n} we have λ<Floor(λ)+1≤k≤n - specifically λ<k
- Lastly we note that {0,…,Floor(λ)}∪{Floor(λ)+1,…,n} is the domain we intended to sum over
To get the stated result note that ∑∞k=0ak:=limn→∞(∑nk=0ak) (by definition of limit of a series
To conclude:
- for n≥Floor(λ)+1 then:
- n∑k=0|k−λ|f(k)=Floor(λ)∑k=0(λ−k)f(k)+n∑k=Floor(λ)+1(k−λ)f(k)
- n∑k=0|k−λ|f(k)=Floor(λ)∑k=0(λ−k)f(k)+n∑k=Floor(λ)+1(k−λ)f(k)
- if n<Floor(λ)+1 then we need to put like Min(Floor(λ),n) as the end value for the first sum, the modifications are trivial.
Notes
- Jump up ↑ For f(k):=P[X=k] and λ:=E[X] we get:
- ∞∑k=0|k−E[X]|P[X=k]
- ∞∑k=0|k−E[X]|P[X=k]
- Jump up ↑ which should be on the floor function page but isn't there at time of writing (sig doesn't work? So: 21st of Jan 2018 ~ 9pm)