Ch. 10 examples Part 1 – z and t Ma260notes_Sull_ch10_HypTestEx.pptx.

Post on 26-Dec-2015

217 views 1 download

Transcript of Ch. 10 examples Part 1 – z and t Ma260notes_Sull_ch10_HypTestEx.pptx.

Ch. 10 examplesPart 1 – z and t

Ma260notes_Sull_ch10_HypTestEx.pptx

Test on a single population mean• Intro: So far we’ve studied estimation, or confidence

intervals, focusing on the middle 90% or 95% or 99%• Now the focus is on Hypothesis Testing (using the 1%

or 5% or 10% in the tails instead)

• As in Ch. 8 (CLT) and 9 (CI s), we’ll study both:– Means and – proportions

Courtroom Analogy-Two Hypotheses: Guilty or Not Guilty

  Our conclusion (the sentence)

    Verdict is Not guilty Verdict is Guilty

Reality Defendant is innocent

Acquittal-                   Correct conclusion

Error

Defendant is guilty

Error Conviction-                    Correct conclusion

Hypothesis Testing in Statistics—Note the chance of two different errors (Type I, II)

Types of Hypotheses in Statistical Testing• The null hypothesis H0 is one which expresses the

current state of nature of belief about a population– Note: The hypothesis with the equal sign is the null

• The alternative (or research) hypothesis (H 1 or H

a ) is one which reflects the researcher’s belief. (It will always disagree with the null hypothesis).– Note: the alternative hypothesis can be one or two tailed.– In one tailed tests, the alternative is usually the claim

Summary of Hypothesis test steps1. Null hypothesis H0, alternative hypothesis H1, and preset α

2. Test statistic and sampling distribution

3. P-value and/or critical value4. Test conclusion

5. Interpretation of test results

2-tailed exH0: µ= 100H1: µ ≠ 100α = 0.05

Left tail exH0: µ = 200H1: µ < 200α = 0.05

Right tail exH0: µ = 50H1: µ > 50α = 0.05

CV approach P value approach decisionIf test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Should you use a 2 tail, or a right, or left tail test?

• Test whether the average in the bag of numbers is or isn’t 100.

• Test if a drug had any effect on heart rate.• Test if a tutor helped the class do better on the

next test.• Test if a drug improved elevated cholesterol.

2-tailed exH0: µ= __H1: µ ≠ __

Left tail exH0: µ = ___H1: µ < ___

Right tail exH0: µ = __H1: µ > __

Example #1- numbers in a bagRecall the experiments with the bags of

numbers.• I claim that µ = 100. We’ll assume =21.9. • Test this hypothesis (that µ = 100 )if your

sample size n= 20 and your sample mean was 90.

Ex #1- Hyp Test- numbers in a bag1. H0: µ = 100

H1: µ ≠ 100

α = 0.05

2. Z = =

3. CV

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decision

If test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #2– new sample mean

• If the sample mean is 95, redo the test:1. H0: µ = 100

H1: µ ≠ 100

α = 0.05

2. Z = =

3. CV

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decisionIf test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #3: Left tail test- cholesterol

• A group has a mean cholesterol of 220. The data is normally distributed with σ= 15

• After a new drug is used, test the claim that it lowers cholesterol.

• Data: n=30, sample mean= = 214.

Ex #3- cholesterol – left test1. H0: µ 220 (fill in the correct hypotheses here)

H1: µ 220

α = 0.05

2. Z = =

3. P-value and/or critical value

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decision

If test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #4- right tail- tutor

Scores in a MATH117 class have been normally distributed, with a mean of 60 all semester. The teacher believes that a tutor would help. After a few weeks with the tutor, a sample of 35 students’ scores is taken. The sample mean is now 62. Assume a population standard deviation of 5. Has the tutor had a positive effect?

Ex #4: tutor1. H0: µ 60

H1: µ 60

α = 0.05

2. Z = =

3. P-value and/or critical value

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decision

If test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

When is unknown…use t tests

Just like with confidence intervals, if we do not know the population standard deviation, we– substitute it with s (the sample standard

deviation) and– Run a t test instead of a z test

First, we’ll review using the t table

Critical values for t• Find the CV for RIGHT tail examples when:

– n=10, = .05– n=15, = .10

• Find the CV for LEFT tail examples when:– n=10, = .05– n=15, = .10

• Find the CV for TWO tail examples when:– n=10, = .05– n=15, = .10– n=20, = .01

Ex #5– t test – placement scores

The placement director states that the average placement score is 75. Based on the following data, test this claim.

• Data: 42 88 99 51 57 78 92 46 57

Ex #5 t test – placement scores

1. H0: µ 75

H1: µ 75α = 0.05

2. t = =

3. P-value and/or critical value4. Test conclusion

5. Interpretation of test results

6. Confidence Interval

CV approach P value approach decision

If test stat is in RR If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #6- placement scores

The head of the tutoring department claims that the average placement score is below 80. Based on the following data, test this claim.

• Data: 42 88 99 51 57 78 92 46 57

Note: P values for t-tests

• We can use the t-table to approximate these values

• Use “Stat Crunch” on the online-hw to get more exact answers. – See the rectangle to the right of the data

Ex #6– t example

1. H0: µ 80 (fill in the correct hypotheses here)

H1: µ 80α = 0.05

2. t = =

3. P-value and/or critical value

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decision

If test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR

p-value > α do not reject H0

Ex #7- salaries– t

A national study shows that nurses earn $40,000. A career director claims that salaries in her town are higher than the national average. A sample provides the following data:

41,000 42,500 39,000 39,99943,000 43,550 44,200

Ex #7- salaries

1. H0: µ 40000 (fill in the correct hypotheses here)

H1: µ 40000α = 0.05

2. t = =

3. P-value and/or critical value

4. Test conclusion

5. Interpretation of test results

CV approach P value approach decision

If test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR

p-value > α do not reject H0

The Hypothesis Testing templateAlthough hw may be worded differently, questions on the test will

require you to do a 5 or 6 step answer (using either p value or CV)

1. Null and alternative hypotheses, H0 and H1, and preset α

2. Test statistic z = or t =3. P-value and/or critical value

4. Test conclusion– Reject H0 or notIf test value is in RR (p-value ≤ α), we reject H0.

If test value is not in RR (p-value > α), we do not reject H0

5. Interpretation of test results6. Confidence Interval (for 2 tailed problems)

Ch.10 – part twoTesting Proportion p

• Recall confidence intervals for p:

• ± z

Hypothesis tests for proportions1. Null hypothesis H0, alternative hypothesis H1, and preset α

2. Sampling distribution Test statistic z =

3. P-value and/or critical value

4. Test conclusion

5. Interpretation of test results

2-tailed exH0: p= .5H1: p ≠ .5α = 0.05

Left tail exH0: p = .7H1: p < .7α = 0.05

Right tail exH0: p = .2H1: p > .2α = 0.05

CV approach P value approach decisionIf test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #8- proportion who like job

• The HR director at a large corporation estimates that 75% of employees enjoy their jobs. From a sample of 200 people, 142 answer that they do. Test the HR director’s claim.

Ex #81. Null hypothesis H0, alternative hypothesis H1, and preset α

H0: p=.75

H1: p

α = 2. Test statistic and sampling distribution

Z = =

3. P-value and/or critical value4. Test conclusion

5. Interpretation of test results6. Confidence interval

CV approach P value approach decisionIf test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0

Ex #9

Previous studies show that 29% of eligible voters vote in the mid-terms. News pundits estimate that turnout will be lower than usual. A random sample of 800 adults reveals that 200 planned to vote in the mid-term elections. At the 1% level, test the news pundits’ predictions.

Ex #91. Null hypothesis H0, alternative hypothesis H1, and preset α

H0: p (fill in hypothesis)

H1: p

α = 2. Test statistic and sampling distribution

Z = =

3. P-value and/or critical value4. Test conclusion

5. Interpretation of test results6. Confidence Interval

CV approach P value approach decisionIf test stat is in RR (Rejection Region)

If p-value ≤ α reject H0

If test stat is not in RR p-value > α do not reject H0