1 1 Ecoomics Sprig 015 /17/015 pp ; Ch New Stata Assigmet ad ew MyStatlab assigmet, both due Feb 4th Midterm Exam Thursday Feb 6th, Chapters 1-7 of Gr...

Author:
Claribel Bruce

0 downloads 31 Views 123KB Size

2/17/2015 pp. 30-38; Ch. 7.1.4 - 7.2 New Stata Assignment and new MyStatlab assignment, both due Feb 24th Midterm Exam Thursday Feb 26th, Chapters 1-7 of Groebner text and all relevant lectures and handouts and computer & book exercises. Bring Calculator & pencil with functioning eraser! Review Session 7:30 pm on Monday, Feb 23d, Gardner 105 Sampling distribution of the sample mean, normal population, sigma unknown (The Student's t distribution) Using the t-distribution when the population is not normal Sampling Distribution of the Population Proportion End of Midterm 1 Material

12

2/17/2015

7 Sampling Distribution of x , Normal Population, Unknown We can immediately use our estimator of sample variance to help us out of a problem that occurs when we try to estimate the sample mean from a normal population where the population standard deviation is unknown. It turns out that s2 is a good estimator of the population variance, 2 . In fact, one can prove that the expected value of s2 is equal to the population variance 2 . To do so we use the rules of expectations that we developed earlier. Here’s a handout that shows you how to do this proof: {Next Slide} Proof that the Sample Variance is an Unbiased Estimator of the Population Variance Early in the course I claimed that the "best" estimator of the population variance, sigma-squared is s-squared defined as: n

(x x )

2

i

s2

i 1

,

n 1

n

(x

i

even though it would seem that a better estimator would be:

x1 , x2 , , xn

So, let for

2

x )2

i 1

.

n

E xi and V xi 2 .

be a random sample with

Show that

s' 2

is a biased estimator

2

is an unbiased estimator for .

s2

and

s '2

First, with some basic algebra (which I'll leave to you) we can demonstrate that: n

2

n 2

(x x) x i

i

i 1

i 1

2

n 1 n xi xi 2 nx 2 . n i 1 i 1

Then, we can write the expected value of this sum of squared differences as: The expected value of a difference is the difference of the expected values. And the expected value of a sum is the sum of the expected values.

n n n E ( xi x )2 E xi 2 nE x 2 E ( xi2 ) nE x 2 . i 1 i 1 i 1

Notice that

is the same for i = 1, 2, ..., n. We use this and the fact that the variance of a random variable

V x E x2 E x

is given by

Ex

2 i

V x E x i

i

2

2

to conclude that 2

2 , E x 2 V x E x / n 2 , 2

and that

2 n n E ( xi x ) 2 2 2 n 2 i 1 i 1 n 2 n 2 2 n 2 n n 2 2 n 1 2 . It follows that

E s '2

1 n 1 n 1 2 E ( xi x ) 2 n 1 2 n i 1 n n

and that

E s2

s '2 is biased because E s '2 2.

However,

1 1 n E ( xi x ) 2 n 1 2 2 n 1 i 1 n 1

so we see that

s 2 is an unbiased estimator

for

2.

Now, we know that when we’re estimating a sample mean from a normal population with a

SampleDist.lwp

Lecture on Sampling Distributions

Page 28 of 37

2/17/2015 known variance our estimator’s distribution is exactly normal. So, if we want to calculate probabilities for a normally distributed estimator of the sample mean we can convert to z-scores:

z

x x n

What happens when we substitute the sample standard deviation for sigma?

z

x x s n

Intuitively you can guess that the mean of the standardized variable z, is still zero since the numerator has not been affected by the substitution. In terms of the variance, we should expect the variance of

be larger than the variance of

x x n

x x s n

to

since one more element of

uncertainty has been added to the ratio. Finally, we should expect the ratio to be symmetrical, since there is no reason to believe that substituting s for sigma will make this distribution skewed either positively or negatively. Note also that the variaiability of the distribution depends upon the size of n, for the sample size affects the reliability with which s estimates . When n is large, s will be a good approximation to ; but when n is small, s may not be very close to . Hence, the distribution of

SampleDist.lwp

Lecture on Sampling Distributions

Page 29 of 37

2/17/2015 x x s n

is a family of distributions whose varibility depends upon n.

So, I hope that it’s clear from this discussion that the distribution of

x x s n

is not

normal, but is more spread out than normal. The distribution of this statistic is called the “t-distribution” and its random variable is denoted as”

t

x x s n

. This is the famous distribution that was discovered by a statistician

named W. S. Gossett, an Irishman who worked for Guiness Brewery. The brewery wouldn’t let him publish his research so he published anonymously under the name of “Student”. In honor of Gosset’s research, published in 1908, the t-distribution is often called “Student’s t-distribution.” The t-distribution is a fairly complex function, and I won’t present it here. Let me list its characteristics: The t-distribution depends upon the size of the sample. It is cusomary to describe the characteristics of the t-distribution in terms of the sample size minus one, or (n-1), as this quantity has special significance. The value of (n-1) is called number of degrees of freedom (abbreviated d.f.), and represents a measure of the number of observations in the sample that can be used to estimate the standard deviation of the parent population. For example, when n=1, there is no way to

SampleDist.lwp

Lecture on Sampling Distributions

Page 30 of 37

2/17/2015 esxtimate the population standard deviation; hence there are no degrees of freedom (n-1=0). There is one degree of freedom in a sample of n=2, since one observation is now “free” to vary away from the other, and the amount it varies determins our estimate of the population standard deviation. Each additional observation adds one more degree of freedom, so that, in a sample of size n, there are (n-1) observations “free” to vary, and hence (n-1) degrees of freedom. The Greek letter or ”nu” is often used to denote degrees of freedom. When sample sizes are small, the t-distribution is seen to be considerably more “spread out” than the standard normal distribution. That is, its tails are thicker: {next slide}

Comparing the t- and normal distributions 0.4

Standardized normal distribution

t distribution (df = 3)

density

0.3 0.2 0.1 0 -3

-2

-1

0

1

2

3

z- and t-values

Here we compare a t-distribution with degrees of freedom = 3 to the standard normal distribution. You can see that the t-distribution has considerably more area under its tails outside of 2 standard

SampleDist.lwp

Lecture on Sampling Distributions

Page 31 of 37

2/17/2015 deviations; however, as degrees of freedom get large, the t-distribution approaches the normal distribution. Because the t-distribution is really a family of distributions it would be very difficult to carry around tables for all possible t-distributions. Instead, tables are usually published that contain probability values for certain critical values. Here’s the t-table out of your textbook: {next slide} The table contains values of t that contain a certain amount of area under the curve to the right. So, with degrees of freedom = 1, t must equal 31.821 {Next Slide} to have one percent ot total area to the right. On the other hand t needs only be 3.747 if the degrees of freedom are equal to 4.{Next Slide} At degrees of freedom = 29 the t-value at one percent is 2.462 which is very close to the z-value 2.326 of the normal distribution for 1-percent right tail probability.

d.f. 1

2 3 4 5 6 7 8

SampleDist.lwp

t .100

3.078 1.886 1.638 1.533 1.476 1.440 1.415 1.397

t .050

6.314 2.920 2.353 2.132 2.015 1.943 1.895 1.860

t .025

12.706 4.303 3.182 2.776 2.571 2.447 2.365 2.306

t .010

31.821 6.965 4.541 3.747 3.365 3.143 2.998 2.896

t .005

63.657 9.925 5.841 4.604 4.032 3.707 3.499 3.355

Lecture on Sampling Distributions

d.f.

1 2 3 4 5 6 7 8

Page 32 of 37

2/17/2015 9

1.383

1.833

2.262

2.821

3.250

9

10 11 12 13 14 15

1.372 1.363 1.356 1.350 1.345 1.341

1.812 1.796 1.782 1.771 1.761 1.753

2.228 2.201 2.179 2.160 2.145 2.131

2.764 2.718 2.681 2.650 2.624 2.602

3.169 3.106 3.055 3.012 2.977 2.947

10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 inf.

1.337 1.333 1.330 1.328 1.325 1.323 1.321 1.319 1.318 1.316 1.315 1.314 1.313 1.311 1.282

1.746 1.740 1.734 1.729 1.725 1.721 1.717 1.714 1.711 1.708 1.706 1.703 1.701 1.699 1.645

2.120 2.110 2.101 2.093 2.086 2.080 2.074 2.069 2.064 2.060 2.056 2.052 2.048 2.045 1.960

2.583 2.567 2.552 2.539 2.528 2.518 2.508 2.500 2.492 2.485 2.479 2.473 2.467 2.462 2.326

2.921 16 2.898 17 2.878 18 2.861 19 2.845 20 2.831 21 2.819 22 2.807 23 2.797 24 2.787 25 2.779 26 2.771 27 2.763 28 2.756 29 2.576 inf.

7.1. Example Using the t-distribution {Next Slide} To see how to use the t-distribution, let’s examine the widely publicized claims of a “well-known neighboring university” that its students have I.Q.’s which are normally distributed with a mean 130. Suppose that I were able to obtain through, methods that I cannot reveal, a random sample of the I.Q.’s of 25 students. This random sample has a mean of 126.8 and a standard deviation of s=6. {Next Slide}

130? {Next Slide} First, convert the sample mean to a t-score assuming that the population mean really is equal to 130: {Next Slide}

SampleDist.lwp

Lecture on Sampling Distributions

Page 33 of 37

2/17/2015

x 126.8 130 P x 126.8 P s/ n 6 / 25 3.2 P t P t 2.667 1.2 Now, since the t-distribution is symmetrical, the probability that

t 2.667 is equal to the probability that t 2.667. The degrees of freedom for this sample is {next slide}:

df 25 1 24. So, looking at the table under df=24 we don’t find a direct match, but we do see that

2.667 lies between 2.492 and 2.797. So, the probability that we would get a sample mean of 126.8 or less, if the true mean were 130 is only between one and one-half percent! So, the probability that the true mean I.Q. of this unnamed university’s students is 130 is very low. {next slide}. The next slide shows that the area to the left of

-2.667 equals the area to the right of +2.667, and that this area is somewhere between 0.01 and 0.005. {next slide -2 clicks} Student's t-distribution of sample mean 0.4

Deg. of freedom 24

density

0.3 0.2 0.1 0 -4

-3

-2

-1

0

1

2

3

4

t-value These are the same areas

Oh, by the way, we’ve just done some statistical inference: We asked the question, what’s the probability of drawing a random sample with mean 126.8 if the true population mean is 130? The answer was: “quite low.” SampleDist.lwp

Lecture on Sampling Distributions

Page 34 of 37

2/17/2015 7.2. Using the t-distribution when the population is not Normal Now, let me emphasize again that the t-distribution assumes that samples are drawn from a parent population that is normally distributed. In practical problems involving this distribution, the question is: just how critical is this assumption of normality in the parent population? Often, we can’t determine the distribution of the parent population, so it becomes difficult to know if using the t-distribution is appropriate. Fortunately, the assumption of normality can be relaxed without significantly changing the sampling distribution of the t-distribution. Because of this, the t-distribution is said to be quite “robust,” implying that its usefulness holds up well under conditions that do not exactly conform to the original normality assumption. So, let’s again emphasize several important aspects of the sampling distribution of x when n is large: {next slide} v When n is large (>30) x will at a minimum be approximately normally distributed. v When n is large s will usually be a good approximation to sigma. v In that case, the distribution of t (x )/s/ n and that of z (x )// n will be approximately the same. v So, for large samples we can use the standard normal distribution to approximate the t-distribution.

8 Sampling Distribution of the Sample Proportion {Next Slide} Let's say that we're doing a political poll about intentions of a randomly selected set of voters to vote for the current president at the next election. The respondents to the poll will respond "yes" or "no" and we want to estimate the probability that the average voter will vote for the president. We can approximate this unknown probability, p, with the sample proportion,

SampleDist.lwp

Lecture on Sampling Distributions

Page 35 of 37

2/17/2015 {next slide}

pˆ

x n

where p is the estimated probability, x is the number of "yes" answers in the sample and n is the size of the sample. That is, we estimate the underlying probability with the sample proportion.

Since each distinct value of x results in a distinct value of

pˆ

x the n

probabilities associated with pare equal to the probabilities associated with the corresponding values of x. Hence, the sampling distribution of p will be the same shape as the binomial probability distribution for x. Like the binomial probability distribution, it can be approximated by a normal probability distribution when the sample size n is large. Now, the expected value of the sample proportion is:{next slide}

1 x 1 E pˆ pˆ E E x np p n n n and the standard error of the sample proportion, p , is {Next Slide}

np (1 p ) p(1 p ) x 1 V pˆ 2pˆ V 2 V x n2 n n n and, {next slide}

pˆ

SampleDist.lwp

p(1 p) n

Lecture on Sampling Distributions

Page 36 of 37

2/17/2015 8.1. Example It's not widely known, but a substantial proportion of super market scanning machines make mistakes when items are scanned in. The North Carolina Division of Weights and Measures tests a store's scanners by randomly selecting 300 register tapes and verifying whether or not there's an error on the tape. Stores are fined if the error rate is more than 2 percent. Suppose 8 tapes show errors; what's the probability of getting 8 or more errors if the true error rate is, in fact, 2 percent (or 6 errors)? Let's approximate the binomial distribution with a normal distribution with: {next slide}

pˆ

x 8 0.02667 n 300

and, {next slide}

pˆ

p 1 p ) n

pˆ 1 pˆ ) n

0.00930

Then, we calculate the z-value under the assumption that the true probability of error is {next slide}

p 0.02 and we get {next slide}

z

pˆ p pˆ 1 pˆ ) n

0.02667 0.02 0.71720 0.00930

so, looking at the normal table we see that the probability of getting

SampleDist.lwp

Lecture on Sampling Distributions

Page 37 of 37

2/17/2015 a 2.7% error rate is (0.5 - 0.263 = 0.237) 23.7 percent, even if the true probability of error is only 2.0%: {next slide}

Standardized normal distribution

0.5-0.263 = 0.237

-3

-2

-1

0

1

2

3

z = 0.71720

So, it's not too unlikely that we'd get an error rate of 2.7% even if the machines are operating within regulatory specs at 2.0%.

SampleDist.lwp

Lecture on Sampling Distributions

Page 38 of 38

Our partners will collect data and use cookies for ad personalization and measurement. Learn how we and our ad partner Google, collect and use data. Agree & Close