STAT 401 Week 4 1 Example Problems Geoffrey Thompson

advertisement

STAT 401 Week 4

Geoffrey Thompson

6/13/2013

1 Example Problems

1. There was, apparently, an election last year. There were a lot of polls and a lot of statisticians had fun with them.

To cut a long story short, here is a simulation of election results based on polls in the month leading up to the election: Election Simulation. There are 20 realizations. The output X is the number of electoral votes won by the GOP candidate.

(a) Plot a histogram and a QQ-plot. Does this distribution look normal?

The tails on the QQ plot look a little funky.

(b) What is the sample mean? What is the sample standard deviation?

Assuming normality, what is P ( X > 270)? How many of the 20 observations are greater than 270?

The sample mean is 239.2 and the standard deviation is 31.0494.

P ( X > 270) = P ( X − µ > 270 − 239 .

2) = P

X − µ

>

σ

X

270 − 239 .

2

31 .

0494

So this is P ( Z > 0 .

992) = 0 .

1606

There are 2 observations greater than 270 and 0 equal to 270.

(c) Suppose we know this is a normal distribution with σ = 23. Test the hypothesis µ > 270.

The alternative hypothesis we are interested in testing is H a

: µ >

270. The null hypothesis is then either µ = 270 or µ < 270 - the exact way of writing it is a convention. There is not a practical difference between the two. In this class, we prefer to say =.

By definition, the test statistic is:

Z = x n

− µ

σ x n

=

239 .

2 − 270

σ/ n

= − 5 .

9888

Note that we are using the standard error of the mean because we are doing hypothesis tests about the mean.

1

Interpreting this can be tricky. Namely, when finding a p -value, do we want the upper tail or the lower tail?

The hint that helps us figure this out is that, if the alternative hypothesis is true, our test statistic should be positive. Therefore, a negative test statistic means it is not evidence in favor of the alternative hypothesis. Therefore, we want to make sure we get a high p -value rather than a low value.

Since Φ( Z ) = 1 .

0571 × 10

− 9 , we want the other tail of the distribution, p = 1 − Φ( Z ) ≈ 1. We fail to reject the null hypothesis and conclude

µ < 270.

(d) Again, suppose we know this is a normal distribution with σ = 23.

Construct a confidence interval for µ with α = 0 .

05.

σ/ n = 23 / 20 = 5 .

143.

Since we are given σ rather than estimating it, we need to find the appropriate Z -score. This is z

α/ 2

= 1 .

96.

The confidence interval is then: x n

− z

α/ 2

σ/

√ n, ¯ n

+ z

α/ 2

σ/

√ n ) = (239 .

2 − 1 .

96 · 5 .

143 , 239 .

2 + 1 .

96 · 5 .

143)

= (229 .

12 , 249 .

28)

(e) Let α = 0 .

05. A common power to use is 1 − β = 0 .

8. Suppose we estimate σ = 23. We are interested in the hypothesis µ > 270.

We want to have a power of .

8 when the sample mean is 240 and

µ

0

= 270. What sample size do we need?

Using the JMP calculator, the answer is 7.

(f) Suppose we do not know σ . Test the hypothesis µ > 270.

Everything is the same except we test using a t statistic instead of a z statistic. Instead of using a provided σ , we estimate ˆ from the data.

T = x n

− µ n

=

239 .

2 − 270

31 .

0494 / 20

= − 4 .

4362

Under the null hypothesis, this is distributed as a central t with 19 degrees of freedom. We can find a p -value using a table or software using the same approach as (c).

p = 0 .

9999.

We fail to reject the null hypothesis.

(g) Construct a confidence interval for µ with α = 0 .

05.

Here, instead of being provided a σ and using a z -quantile, we take the estimated

ˆ and use a t -quantile to make the interval.

x n

− t

α/ 2 ,n − 1

σ/

√ n, ¯ n

+ t

α/ 2 ,n − 1

σ/

√ n ) = (239 .

2 − 2 .

093 · 6 .

9428 , 239 .

2 + 2 .

093 · 6 .

9428)

= (224 .

6684 , 253 .

7316)

2

(h) 20 is a rather small number of simulations to run. Here is a file with 10,000: 10,000 Election Simulations. The central limit theorem is in full force here when it comes to estimating the mean. Plot a histogram and a QQ plot. Does this appear normal?

The QQ plot will generally start to look normal if enough data points are added.

(i) Assuming normality, estimate P ( X > 270) from this data set.

There is a sample mean of 239.5191 and a sample standard deviation of 23.314.

Assuming normality, this means P ( X > 270) = 0 .

0955 .

(j) One method to find P ( X > 270) without making any assumptions is to see what percentage of observations are greater than 270. Is this estimate higher or lower than the one using the assumption of normality?

There are 953 observations greater than 270 for a proportion of

0.0953. This is approximately the same as under the assumption of normality, but slightly less.

2. There is a list of the top 100 chess players in July 2000. It is very exciting.

We are interested in their ratings. The rating is in the column labelled

“rating”.

(a) Plot a histogram of the ratings. Plot a QQ plot. What is the mean?

What is the standard deviation? Does this look normal?

This doesn’t look normal, because there are more players at the lower end. This is understandable, because it is a truncated distribution.

(b) For two players, A and B , suppose P( A beats B ) = Φ(( R

A

− R

B

) /σ

R

), where R

A

σ

R and R

B are is some constant.

A ’s rating and B ’s rating, respectively, and

If we know Anand has a 62% chance of beating Karpov, what is σ

R

?

See the table of ratings.

Anand is rated 2774 and Karpov is rated 2699. So we want to solve

Φ(75 /σ ) = 0 .

62.

Looking at a table, this implies 75 /σ = 0 .

732.

Therefore, σ =

102 .

459.

(c) Ratings are not precise measurements, but rather estimates of skill based on performance. Suppose σ

X

= 24 is the standard deviation of any individual’s rating. i.e., if repeated measurements of one player’s rating were taken, it would be a random variable with some mean and a standard deviation of 24. Create a confidence interval for Anand’s rating with α = .

05.

( µ − zσ, µ + zσ ) = (2774 − 1 .

96 · 24 , 2774+1 .

96 · 24) = (2726 .

9609 , 2821 .

0391)

3

(d) Test whether Morozevich’s rating is over 2700 (using σ = 24).

Morozevich’s rating is 2734 on the list.

H

0

2700.

: R = 2700.

H a

: R >

We are given σ , so this is going to be a z -test. The test statistic is : z =

ˆ

− R

σ

=

2734 − 2700

24

= 1 .

4167

To get the p -value from this, we compare to the normal quantiles.

z = 1 .

4167 yields a p = 0 .

0783. This is weak evidence in favor of the alternative hypothesis. If we were applying a strict .05

p -value threshold, we would fail to reject the null hypothesis.

(e) There are 99 players on the list. If 10 are chosen at random, what is the probability that 2 have a rating under 2600?

There are 8 players on the list with ratings below 2600. This is a hypergeometric problem.

P ( X = 2) =

89

8

99

10

8

2 = 0 .

1364

2 References

Polling Information

FIDE Top Ratings List

STAT 401 Page

4

Download