PS U9 Notes - blank copy

advertisement
Probability and Statistics – Mrs. Leahy
Unit 9: Hypothesis Testing
Unit 9: Section 1 – Introduction to Statistical Tests
One of a statistician’s most important jobs is to draw inferences about ___________________based on
____________________ taken from the population. Usually we are using population parameters like the
___________ of the population or the _______________ of success in a binomial trial.
We approach these inferences in one of two ways:
1. ____________________ (Unit 8) – use the sample to get “close enough” value to the actual parameter
2. Hypothesis Testing (Unit 9) – making decisions about the value of a population parameter
Null and Alternate Hypotheses
The statement that is under
investigation.
Usually represents a statement of
“no effect,” “no difference,” or
“things haven’t changed.”
Example:
a) The average height of a professional male basketball player was 6.5 feet 10 years ago.
Null Hypothesis:
b) A television network claims that the time devoted to commercials in a 60-minute program is
12 minutes.
Null Hypothesis:
c) A repair shop claims that it should take an average of 25 minutes to install a new muffler.
Null Hypothesis:
This is the statement you will use if
the evidence is so strong that you
have to reject the null hypothesis.
A statistical test is made to assess the strength of the evidence
against the null hypothesis.
“You believe that µ is _____ than the value that is stated in H0 “
Example:
a) The average height of a professional male basketball
player was 6.5 feet 10 years ago. You believe that the
average height of basketball players today is taller than
it was 10 years ago.
b)
Null Hypothesis:
Alternate Hypothesis:
c) A car manufacturer advertises that its new subcompact models get 47 miles per gallon. Let µ be the mean of
the mileage distribution for these cars. You assume that the manufacturer will not underrate the car, but you
suspect that the mileage might be overrated.
What should we use for H0 ?
What should be use for H1?
d) A company manufactures ball bearings for precision machines. The average diameter of a certain type of ball
bearing should be 6.0mm. To check that the average diameter is correct, the company formulates a statistical
test.
What should be use for H0?
What should be used for H1?
Hypothesis Tests of µ, Given x is normal and σ is known
Example:
Rosie is an aging sheep dog in Montana who gets regular check-ups from her owner, the local veterinarian. Le x
be a random variable that represents Rosie’s resting heart rate (in beats per minute). From past experience, the
vet knows that x has a normal distribution with σ = 12. The vet check a veterinary manual and found that for dogs
of this breed µ = 115 beats per minute.
Over the past six weeks, Rosie’s heart rate measured: 93, 109, 110, 89, 112, 117
The sample mean is 𝑥̅ =105.0
The vet is concerned that Rosie’s heart rate may be slowing. Do the data indicate that that is the case?
Step 1: Establish the null and alternate hypotheses
Step 2: Are the data compatible with H0 ?
Step 3: Calculate the test statistic and find the probability. This is called the “P value” of the test.
How likely (what is the probability) of getting a sample mean of _____ from a population mean of _____?
Step 4: Interpretation
If P-value is high, we accept the null hypothesis  Rosie’s heart rate is not slowing.
If P-value is low, we reject the null hypothesis  Rosie’s heart rate is slowing.
Have we proved H0 is false?
Instead we say that H0 has been discredited by a small P-value of _____.
We adopt the claim H1 instead.
Types of Errors
The level of significance α is the probability of rejecting H0 (the null hypothesis) when it is true.
Example: (Ball Bearings)
Type 1 Error:
Type 2 Error:
H0: µ=6.0mm
H1: µ≠6.0mm
The manufacturer requires a 1% level of significance.
Caused when we ___________ H0 when in fact ___________.
The probability of such an error is _____.
Caused when we ___________ H0 when in fact ___________.
So how do we use this? The level of
significance helps us determine
whether to reject the null hypothesis
or not based on our data.
Example:
Example:
The level of significance is α =0.01
a) What is the level of significance? State the null and alternate hypotheses. Will you use a left-tailed, right
tailed, or two-tailed test?
b) What sampling distribution with you use? (normal, t-distribution, binomial probability, etc)
What is the value of the sample test statistic?
c) Find the P-value. Sketch the sampling distribution and show the area corresponding to the P-value.
(use z-distribution table)
d) Based on parts a,b,&c, will you reject or fail to reject the null hypothesis? Are the data
statistically significant at level α ?
P-value ≤ α
reject
data statistically
significant at level α
P-value >a
fail to reject
e) State your conclusion in the context of the application.
The evidence is _______________________ at the ______ level to reject the claim that
sufficient/insufficient
α
_____________. It seems that ____________________________________________.
H0
What appears to be true? H0 or H1 ?
Null/Alternate Hypothesis Review
Criminal Trials in the United States
The jury is always told that the defendant is “innocent until proven guilty”.

What must a member of the jury assume about the defendant at the
beginning of the trial? This is the null hypothesis.
H0: _______________________

It is the prosecuting attorney’s job to present evidence to the jury. IF
there is enough evidence (“beyond a reasonable doubt”), then the jury
will convict the defendant of the crime. If the defendant is convicted,
the jury is rejecting the null hypothesis (above) and saying that the
defendant is _________. This is the alternative hypothesis.
HA: _______________________

When the jury convicts someone of a crime, their verdict is GUILTY.
Is this “Reject H0” OR “Fail to Reject H0”?

If the jury does not convict someone of a crime, their verdict is NOT GUILTY.
Is this “Reject H0” OR “Fail to Reject H0”?

How does the verdict of “not guilty” differ from “innocent”?
Sometimes the jury makes a correct decision and sometime the jury makes a mistake.

When H0 is true, but we reject it based on the sample evidence, this is an error. We call it a Type I error.
Write a sentence describing a Type I error in the U.S. criminal justice system.

b. When H0 is false, but we fail to reject it based on the sample evidence, this is also an error. We call it a
Type II error. Write a sentence describing a Type II error in the U.S. criminal justice system.
Put each of the following in the correct place in the table below…
Type I Error
Type II Error
Correct Decision
Correct Decision
Decision Based on Evidence (Data)
Reject H0
Fail to Reject H0
H0 is true
TRUTH
(Unknown)
H0 is false
(and HA is true)
Unit 9: Section 2 – Testing the Mean µ
Example: Sunspots have been observed for many
centuries. Some archaeologists think sunspot
activity may somehow be related to prolonged
periods of drought in the southwestern United
States. Let x be a random variable representing
the number of sunspots observed in a four-week
period.
You take a random sample of 40 such periods.
The sample mean 𝑥̅ =47.0
Previous studies of sunspot activity during this
period indicate that σ=35 and that the mean
number of sunspots per period was µ =41.
Do the data indicate that the mean sunspot
activity has changed and is now higher than 41?
Use α =0.05 ? If so, this may be linked to gradual
climate change.
Example: The drug 6mP is used to treat
leukemia. A random sample of 7 patients
using this drug was taken and the remission
times in weeks were recorded. Let x be a
random variable representing the remission
time for all patients using 6mP. Assume the
distribution is mound shaped and
symmetrical. A previously used drug
treatment had a mean remission time of µ
=12.5 weeks.
The sample mean 𝑥̅ =17.1 weeks with a
sample standard deviation of s = 10.0.
Do the data indicate that the mean
remission time using the drug 6MP is
different (either way) from 12.5 weeks? Use
α =0.01
Using a graphing calculator instead of the Student’s t-distribution table
Step 1: State the null hypothesis and the alternate hypothesis
Step 2: Identify µ , 𝑥̅ , s, n
Step 3: Graphing Calculator
STAT
TESTS
2: T-Test
Step 4: Inpt: Stats (enter)
Enter values for µ , 𝑥̅ , s, n
Choose symbol from alternate hypothesis (enter)
Choose Calculate (enter)
Step 5: State P-value and Make a Statistical Conclusion
Example :
Example:
Unit 9: Section 3 – Testing a Proportion “p”
Recall that for we can approximate certain binomial probability
distributions using the normal distribution.
Example:
Null and Alternate Hypotheses for Tests of Proportions
Note: if you calculate the
denominator separately, be sure to
use at least 4 decimals.
Example: A team of eye surgeons has developed a new technique for a risky eye operation to restore the sight of people
blinded by a certain disease. Under the old method, it is know that only 30% of the patients who undergo this operation
recover their sight. Suppose the surgeons in various hospitals have performed a total of 225 operations using the new
method and that 88 have been successful. Can we justify the new method is better than the old method? Use a 1% level of
significance.
Example: A botanist has produced a new variety of hybrid wheat that is better able to withstand drought than
other varieties. The botanist knows that for the parent plants, the proportion of seeds germinating is 80%. To
test this claim, 400 seeds from the hybrid plant are tested, and it is found that 312 germinate. Use a 5% level of
significance to test the claim that the proportion germinating for the hybrid is 80%.
Download