Transcript Document

Lesson 11 - R
Review of
Testing a Claim
Objectives
• Explain the logic of significance testing.
• List and explain the differences between a null
hypothesis and an alternative hypothesis.
• Discuss the meaning of statistical significance.
• Use the Inference Toolbox to conduct a large sample
test for a population mean.
• Compare two-sided significance tests and
confidence intervals when doing inference.
• Differentiate between statistical and practical
“significance.”
• Explain, and distinguish between, two types of
errors in hypothesis testing.
• Define and discuss the power of a test.
Vocabulary
• none new
What you Learned
– State the null and alternative hypotheses in a testing situation
when the parameter in question is a population mean µ.
– Explain in nontechnical language the meaning of the P-value
when you are given the numerical value of P for a test.
– Calculate the one-sample z-statistic and the P-value for both
one-sided and two-sided tests about the mean µ of a Normal
population.
– Assess statistical significance at standard levels α by
comparing P to α.
– Recognize that significance testing does not measure the size
or importance of an effect.
– Recognize when you can use the z test and when the data
collection design or a small sample from a skewed population
makes it inappropriate.
– Explain Type I error, Type II error, and power in a significancetesting problem.
Hypothesis Testing Approaches
• Classical
– Logic: If the sample mean is too many standard deviations
from the mean stated in the null hypothesis, then we reject the
null hypothesis (accept the alternative)
• P-Value
– Logic: Assuming H0 is true, if the probability of getting a
sample mean as extreme or more extreme than the one
obtained is small, then we reject the null hypothesis (accept
the alternative).
• Confidence Intervals
– Logic: If the sample mean lies in the confidence interval about
the status quo, then we fail to reject the null hypothesis
Determining Ho and Ha
• Ho – is the status quo;
what the situation is currently
the claim made by the manufacturer
• Ha – is the alternative that you are testing;
the new idea
the thing that proves the claim false
• H0 and Ha always refer to population parameters
Inference Toolbox
• Step 1: Hypothesis
– Identify population of interest and parameter
– State H0 and Ha
• Step 2: Conditions
– Check appropriate conditions
• Step 3: Calculations
– State test or test statistic
– Use calculator to calculate test statistic and p-value
• Step 4: Interpretation
– Interpret the p-value (fail-to-reject or reject)
– Don’t forget 3 C’s: conclusion, connection and
context
Conditions for Significance Tests
• SRS
– simple random sample from population of interest
• Normality
– For means: population normal or large enough
sample size for CLT to apply or use t-procedures
– t-procedures: boxplot or normality plot to check for
shape and any outliers (outliers is a killer)
– For proportions: np ≥ 10 and n(1-p) ≥ 10
• Independence
– Population, N, such that N > 10n
Using Your Calculator: Z-Test
• For classical or p-value approaches
• Press STAT
– Tab over to TESTS
– Select Z-Test and ENTER
•
•
•
•
X-bar – μ
Z0 = --------------σ / √n
Highlight Stats
Entry μ0, σ, x-bar, and n from summary stats
Highlight test type (two-sided, left, or right)
Highlight Calculate and ENTER
• Read z-critical and/or p-value off screen
Hypothesis Testing: Four Outcomes
Reality
Do Not Reject H0
H0 is True
Correct
Conclusion
H1 is True
Type II
Error
Reject H0
Type I
Error
Correct
Conclusion
Conclusion
H0: the defendant is innocent
H1: the defendant is guilty
decrease α  increase β
increase α  decrease β
Type I Error (α): convict an innocent person
Type II Error (β): let a guilty person go free
Note: a defendant is never declared innocent; just not guilty
Increasing the Power of a Test
• Four Main Methods:
– Increase significance level, 
– Consider a particular alternative that is farther
away from 
– Increase the sample size, n, in the experiment
– Decrease the population (or sample) standard
deviation, σ
• Only increasing the sample size and the
significance level are under the control of the
researcher
Summary and Homework
• Summary
–
–
–
–
–
–
–
–
Inference testing has an H0 and an Ha to evaluate
H0 is the status quo and cannot be proven
Ha is the claim that’s being tested
Small p-values (tails), or p < , are in favor of Ha
P(Type I error – reject H0 when H0 is true) = 
P(Type II error – FTR H0 when Ha is true) = 
Power (of a test) = 1 - 
Increase power by increasing n or 
• Homework
– pg 738 – 9; 11.65 – 74
Problem 1
When performing inference procedures for
means we sometimes use the normal
distribution and sometimes use Student’s t
distribution. How do you decide which to use?
We use normal distributions in inference procedures for population
proportions always and for population means if we know the
population standard deviation (very rare).
We use the Student’s t distribution for population means when we
don’t know the population standard deviation and have to use the
sample standard deviation as its estimate.
Problem 2a
The blood sugar levels of 7 randomly selected rabbits of a
certain species are measured 90 minutes after injection of
0.8 units of insulin. The data (in mg/100 ml) are: 45, 34,
32, 48, 39, 45, 51. The researcher would like to use this
sample to make inferences about the mean blood sugar
level for the population of rabbits.
(a) List the conditions (assumptions) that must be
satisfied in order to compute confidence intervals or
perform hypothesis tests. Also, provide information to
convince me that the condition is satisfied.
Conditions:
SRS – problem states random selection, so assume ok
Normality – n = 7 is too small for CLT to apply so box-plot of data is required
to check if normality is not a good assumption and to see if there are any
outliers! [no outliers, symmetry not great, normality plot ok]
Independence – assumption is reasonable from problem
Problem 2b
The blood sugar levels of 7 randomly selected rabbits of a
certain species are measured 90 minutes after injection of
0.8 units of insulin. The data (in mg/100 ml) are: 45, 34,
32, 48, 39, 45, 51. The researcher would like to use this
sample to make inferences about the mean blood sugar
level for the population of rabbits.
(b) Calculate a 90% confidence interval for the mean blood
sugar level in the population of all rabbits of this
species 90 minutes after insulin injection.
Calculations:
n = 7, x-bar = 42 mg/100 ml, s = 7.165 mg/100 ml, and α/2 = .05
CI = x-bar  t.95,6(s/√n) = 42  1.943(7.165/√7) = 42  5.262
From calculator: [36.738, 47.262 ]
Problem 3
The mean length of the incision used in arthroscopic knee
surgery has been 2.0 cm. An article in a recent medical
journal reports that a new procedure can reduce the
average length of the incision used in such surgeries.
The authors of the article reported that in a sample of 36
such surgeries in which the new technique was used, the
average incision length was 1.96 cm, with a standard
deviation of 0.13 cm. Perform a test at the α = .05 level to
determine whether the mean length of incision used in the
new procedure is significantly less than 2.0 cm. Assume
that any conditions needed for inference are satisfied.
Problem 3
Hypothesis: μ = average incision length of old procedure
H0: μ = 2.0 cm
no change
Ha: μ < 2.0 cm
new procedure better (One sided test)
Conditions: “Assume that any conditions . . . satisfied”
Calculations:
μ = 2.0 cm, n = 36, x-bar = 1.96 cm, s = 0.13 cm, and α = .05
TS = (1.96 – 2.0)/(0.13/√36) = -1.846
From calculator: TS = -1.846 p-value = 0.0367
Interpretation:
Since p < , then we have evidence to reject H0 in favor of Ha. The
new procedure has smaller average length incision (scars) than the
old procedure. Statistically significant result, but not much real
practical significance (0.04 cm improvement or about 1/50 of an inch).
Problem 4
A company institutes an exercise break for its workers to
see if this will improve job satisfaction. A questionnaire
designed to assess worker satisfaction was given to 10
randomly selected workers before and after
implementation of the exercise program. These scores
are provided in the table below:
Worker #
Score before
Score after
1
34
33
2
28
36
3
29
50
4
45
41
5
26
37
6
27
41
7
24
39
8
15
21
9
15
20
10
27
37
Perform a significance test to determine whether the
exercise program was effective in improving job
satisfaction. You should state the conditions necessary
for the test you perform to be valid, but you do not need
to check these conditions. Organize your work clearly
and be sure to show all steps of the test below.
Problem 4 cont
Worker #
Score before
Score after
Difference
1
34
33
-1
2
28
36
8
3
29
50
21
4
45
41
-4
5
26
37
11
6
27
41
14
7
24
39
15
8
15
21
6
9
15
20
5
10
27
37
10
Hypothesis: μ = average difference between after and before program
H0: μdiff = 0
program ineffective
Ha: μdiff > 0
program improves job sat.
(One sided test)
Conditions: SRS – ok; Normal – no CLT, but box-plot and normality
plots OK; Independent – weak
Calculations:
μ = 0, n = 10, x-bar = 8.94, s = 6.749, and α = .05
TS = (8.94 – 0)/(6.749/√10) = 4.189
From calculator: t = 4.189 and p-value = 0.0012
Interpretation: Since p-value is < , we reject H0 in favor of Ha and
conclude that the exercise program improves job satisfaction.