Feb 27: Expectation, Variance, and Standard Deviation · 2020-02-27 · Variance, and Standard...

Preview:

Citation preview

Feb 27: Expectation, Variance, and Standard

Deviation

In-class Midterm Exam MOVED

to 3/10

Goals for today

What are mean, variance, and standard deviation?

What is the difference between distribution mean/variance and sample mean/variance?

When are mean and variance informative, and when are they misleading?

What is the 68/95/99.7 rule?

Mean is a balance pointtorque = force × distance

Mean is a balance pointtorque = force × distance

Mean is a balance pointtorque = force × distance

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 10

6.44

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 10

x - μ =

6 - 6.44 = -0.44

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 10

4 × -0.44

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides

Σ (x - μ) = 0

Σ x = Nμ

(Σ x)/N = μ

55

6666

777 10

mean = average

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 10

6.44

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 8

Mean is a balance pointtorque = force × distance

balance point is where we get equal torque on both sides 5

5

6666

777 8

Mean is sensitive to outliers

55

6666

777 17

5 5 6 6 6 6 7 7 10

Median ignores values

5 5 6 6 6 6 7 7 10

Median ignores values

5 5 6 6 6 6 7 7 328

Median ignores values

The sum of squared distances to the meanx = [2, 3, 7]

2 3 7

2 3 7

The sum of squared distances to the mean

2 3 7

The sum of squared distances to the mean

2x2

1x1

3x3

2 3 7Σ (x - μ)2

N

= (4 + 1 + 9)/3 = 4.66

Variance: mean squared distances to the mean

2 3 7Σ (x - μ)2

N

= (4 + 1 + 9)/3 = 4.66

Variance: mean squared distances to the mean

2.16x2.16

2 3 7Σ (x - μ)2

N

= (4 + 1 + 9)/3 = 4.66

Variance: mean squared distances to the mean

2.16

2 3 7

Standard deviation: square root of mean squared distances to the mean

2.64x2.64

2 3 7Σ (x - μ)2

N-1

= (4 + 1 + 9)/2 = 7

Variance: alternative form

2x2

1x1

3x3

2 3 7

Mean is the point that minimizes variance for a fixed data set

d/dμ Σ (x - μ)2

= 2 Σ (x - μ)

Σ (x - μ) = 0

Goals for today

What are mean, variance, and standard deviation?

What is the difference between distribution mean/variance and sample mean/variance?

When are mean and variance informative, and when are they misleading?

What is the 68/95/99.7 rule?

Mean is a balance point for a distributiontorque = force × distance

balance point is where we get equal torque on both sides

P(2)

P(3)

P(4)

P(10)

Mean is a balance point for a distributiontorque = force × distance

balance point is where we get equal torque on both sides

μ = Σ x P(x)

P(2)

P(3)

P(4)

P(10)

mean = average = expectation

What are the expectations of these two dice?

P(6)=1/2

P(6)=1/6

μ = E[x]

= Σ x P(x)

What are the expectations of these two dice?

P(6)=1/2

P(6)=1/6

μ = E[x]

= Σ x P(x)

"expectation of x"

What are the expectations of these two dice?

P(6)=1/6 E[x] = Σ xP(x)= 1×.16 + 2×.16 + ... + 6×.16= (1 + 2 + ... + 6) × .16= 21 / 6 = 3.5

What are the expectations of these two dice?

P(6)=1/6

μ = E[x]

= Σ x P(x)

= Σ x / Nonly if P(x) is uniform for all x

What are the expectations of these two dice?

P(6)=1/2

E[x] = Σ xP(x)= 1×.1 + 2×.1 + ... + 6×.5= .1 × (1 + 2 + ... + 5) + 3= 1.5 + 3 = 4.5

What are the variances of these two dice?

P(6)=1/2

P(6)=1/6

σ2 = E[Σ (x-μ)2]

= Σ (x-μ)2 P(x)

Which has greater variance?

P(6)=1/2

P(6)=1/6

Variance of uniform distribution

P(6)=1/6 var[x] = Σ (x-μ)2 P(x)= (1-3.5)2×.16 + ... +

(6-3.5)2×.16= -2.52×.16 + -1.52×.16 + ... +

2.52×.16= 2.916

Variance of non-uniform distribution

P(6)=1/2

var[x] = Σ (x-μ)2 P(x)= (1-4.5)2×.1 + ... + (6-4.5)2×.5= -3.52×.1 + ... + 1.52×.5= 3.25

Which has greater variance?

P(6)=1/2

P(6)=1/6

Sample mean/var vs. Distribution mean/var

sample distribution

mean x̄ = Σ x/N μ = Σ x P(x)

variance s2 = Σ(x-x̄)2/N σ2 = Σ (x-μ)2 P(x)

Sample mean/var vs. Distribution mean/var

sample distribution

mean x̄ = Σ x/N μ = Σ x P(x)

variance s2 = Σ(x-x̄)2/N σ2 = Σ (x-μ)2 P(x)

Distribution vs. Sample with dice

Mean and variance for distributions

mean variance

binomial np np(1-p)

geometric 1/p (1-p)/p2

Poisson λ λ

Distribution vs. Samplewith parametric distributions

Goals for today

What are mean, variance, and standard deviation?

What is the difference between distribution mean/variance and sample mean/variance?

When are mean and variance informative, and when are they misleading?

What is the 68/95/99.7 rule?

Recommended