/
STT 200 – Lecture 5, section 23,24 STT 200 – Lecture 5, section 23,24

STT 200 – Lecture 5, section 23,24 - PowerPoint Presentation

alexa-scheidler
alexa-scheidler . @alexa-scheidler
Follow
418 views
Uploaded On 2016-05-15

STT 200 – Lecture 5, section 23,24 - PPT Presentation

Recitation 13 492013 1 TA Zhen Zhang zhangz19sttmsuedu Office hour C500 WH 34 PM Tuesday office tel 4323342 Helproom A102 WH 900AM100PM Monday Class meet on Tuesday ID: 320180

player test hypothesis shots test player shots hypothesis sample coach power true reject confidence size proportion coin error interval

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "STT 200 – Lecture 5, section 23,24" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

STT 200 – Lecture 5, section 23,24Recitation 13(4/9/2013)

1

TA: Zhen Zhang

zhangz19@stt.msu.edu

Office hour: (C500 WH) 3-4 PM Tuesday

(

office

tel.:

432-3342)

Help-room: (A102 WH)

9:00AM-1:00PM

,

Monday

Class meet on Tuesday:

12:40 – 1:30PM

A224 WH, Section

23

1:50

2:40PM

A234

WH, Section

24Slide2

Example (sampling distribution and confidence interval)Recall that the data we have last time contain “yes/no” responses from a population of 400 persons who were asked if they have wireless internet access at home. The population proportion of “yes”

is 0.5575

.

We draw many random samples with size , the sampling distribution of can be approximated by If we really don’t know , we draw sample with size , obtain and construct 95% confidence interval using . We are 95% confident that is between it.

 

2Slide3

Example (hypothesis testing)What if we have certain hypothesis on, and want to test it? For instance, a survey in 2011 suggests that only 40% residents in this region have wireless internet access at their house. We want to test if this is true in the data we collected in 2012, or if there is a noticeable increment. That is:

versus

.

We decide to draw a sample with size to conduct the proportion test.… But before that, we need to check several conditions.  3Slide4

Example (check conditions)To validate the proportion test, we need to check several conditions once we determine the sample size : Independence condition: the

responses in the sample are chosen independently.

Randomness condition:

the responses in the sample are chosen randomly. We used the table of random digits from 1 to 400. 10% condition: the sample size is less than 10% of the population size 400. Success/failure condition: Both 14.8 and are greater than 10.  4Slide5

Example (hypothesis testing, continued)To test:

versus

.

We draw a sample with size , and obtain . If is true, that is, , then , and the z-score with P-value

.

Which means if really

, then an observed proportion as large as would occur at random only 19 times in 1000. With a P-value this small, we reject

and conclude

.

What if the hypotheses were:

versus

?

This becomes

two-sided

, and P-value becomes

. and we will still reject if our significance level is

 

5Slide6

Interaction with confidence intervalWe can also construct the confidence interval for given significance level :

Determine confidence level

. For two-sided test (

), ; For one-sided test ( or ), .The critical value, either using Normal table, or qnorm((C+1)/2) in R, or invNorm((C+1)/2) in calculator.Find . Note we use , not , since it is

, not

.

The margin of error is

The confidence interval is

, and check that whether

is contained in this interval.

In our example for

v

, and

, we have

,

,

, hence the 90% confidence interval is

,

which is above

.

 

6Slide7

Errors and powerSome important concepts :Type I error: reject when it is true.

Type II

error:

accept when it is false.Power of the test: the probability of rejecting when it is false (i.e., when is true).In our example for v, and , we will reject if we observe a z-score , or a proportion . Under the true proportion , , so the power of this test is

.

 

7Slide8

Question #1:Suppose we want to test whether a coin is fair. We toss it many times, count the proportion of heads, and find a P-value of 0.32. Which conclusion is appropriate? There’s a 32% chance that the coin is fair.There’s a 32% chance that the coin is

not fair.

There’s a

32% chance that natural sampling variation could produce coin-tossing results like these if the coin is really fair.There’s a 32% chance that natural sampling variation could produce coin-tossing results like these if the coin is not fair.Ans: we discussed in class. 8Slide9

Question #2:Many people have trouble setting up all the features of their cell phones, so a company has developed what it hopes will be easier instructions. The goal is to have at least 96% of customers succeed. The company test it on 200 people, and 188

were successful. Is this a strong evidence that their system fails to meet the goal? A student’s test of this hypothesis is shown. How many mistakes can you find?

To test:

versus .The sample is SRS, with 0.96(200)>10. . , and the z-score with P-value . There is strong evidence that the new instructions do not work.

Ans: we discussed in class.

 

9Slide10

Question #3:Many people have trouble setting up all the features of their cell phones, so a company has developed what it hopes will be easier instructions. The goal is to have at least 86% of customers succeed. The company test it on 100 people, and

93 were successful. Is this a strong evidence that their system fails to meet the goal? Our second student’s test of this hypothesis is shown. How many mistakes can you find?

To test:

versus .The sample is SRS, with 0.86(100)>10 and 0.14(100)>10 . . , and the z-score with P-value . Since this is significant under

𝛼=0.05,

we reject

and conclude there is strong evidence that the new instructions do not work. Ans: The only error is the P-value should be

!

 

10Slide11

Question #4:A basketball player with a poor foul-shot record practices intensively during the off-season. He tells the coach that he has raised his proficiency from 60% to 80%. Dubious, the coach asks him to take 10 shots, and surprised when the player hits 9 out 10 shots. Did the player prove that he has improved? Suppose the player really is no better than before, still 60% shooter. What’s the probability he can hit at least 9 of 10 shots anyway?If that is what happened, now the coach thinks the player has improved when he has not. Which type of error is that?

If the player really can hit 80% now, and it takes at least 9 out of 10 successful shots to convince the coach, what’s the power of the test?

List two ways the coach and player could increase the power to detect any improvement.

11Slide12

Question #4 - solution:Suppose the player really is no better than before, still 60% shooter. What’s the probability he can hit at least 9 of 10 shots anyway?Let X be the number of shots he hits, which follows Binomial model with

n=10 and p=0.6

under the null hypothesis. We have

, and , so .If that is what happened, now the coach thinks the player has improved when he has not. Which type of error is that? The null hypothesis is that the player really is no better than before. So if the coach thinks the player has improved (reject the null hypothesis) when he actually has not (when the null hypothesis is true), this is Type I error. 12Slide13

Question #4 – solution (continued):If the player really can hit 80% now, and it takes at least 9 out of 10 successful shots to convince the coach, what’s the power of the test

?The power is the probability that we reject the null hypothesis when it is false, i.e., the alternative is true. Since

X

the number of shots he hits follows Binomial model with n=10 and p=0.8 under the alternative hypothesis, we have , and , so .List two ways the coach and player could increase the power to detect any improvement. Increases the number of shots but still accept the improvement when he hits more than or equal to 9 shots. Or keep the number of shots at 10, but increase 𝛼 by declaring that 8,9, or 10 will be deemed as having improved, then the power will be which is larger than that calculated in c).  13Slide14

Thank you.14