Download PowerPoint

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
STATISTICS 200
Lecture #19
Tuesday, October 25, 2016
Textbook: Sections 12.3 to 12.4
Objectives:
• Frame a 2x2 test of independence as a test of difference of
two proportions
• Apply ideas of forming hypotheses, calculating test statistics,
and calculating p-values.
• Use Minitab to find probabilities for normal, binomial, and chisquare distributions
Quick review of odds vs. risk/probability
I came across this quotation recently:
“It will take several days for serious scientific polls to come
in, but the betting markets respond in real time.
PaddyPower, the Irish bookie, puts the odds on Clinton at
2/11, which implies an 85% chance that Clinton will win.
U.K.-based William Hill is offering 1/6 odds on Clinton,
implying that she has an 86% chance of winning.”
How are these percents calculated?
Ans: Odds of 2/11 give a probability of 2/13 (of losing),
which is a winning probability of 11/13=84.6%.
Recall this example:
Are women more likely to have dogs?
Female
Male
Total
Has Dog
89
56.7%
66
50.8%
155
No Dog
68
43.3%
64
49.2%
132
Total
157
130
287
Your class data
Recall this example:
Are women more likely to have dogs?
Female
Male
Total
Has Dog
89
56.7%
66
50.8%
155
No Dog
68
43.3%
64
49.2%
132
Total
157
130
287
Let’s reframe this problem: Examine the difference
between two independent proportions, that is, pf–pm.
Is it zero? Let’s run a statistical hypothesis test.
Clicker Quiz #12
Recall this example:
Are women more likely to have dogs?
Female
Male
Total
Has Dog
89
56.7%
66
50.8%
155
No Dog
68
43.3%
64
49.2%
132
Total
157
130
287
H0: pf–pm = 0
Hypotheses:
Ha: pf–pm ≠ 0
In this dataset,
This is a
two-sided
alternative.
Review: The sampling distribution of
As long as both p-hat1 and p-hat2 are
approximately normal…
...and the two samples are independent...
Then the sampling distribution is
approximately normal with mean p1–p2 and
standard deviation
Recall the general test statistic formula:
In our example, the parameter is pf–pm.
Therefore:
• The sample estimate is
• The mean under H0 is 0
• The std dev. under H0 is
Notice: Same value of
p-hat in both fractions!
That value is the combined
sample proportion:
Recall the general test statistic formula:
In our example, the parameter is pf–pm.
Therefore:
• The sample estimate is
• The mean under H0 is 0
• The std dev. under H0 is
Conclusion: The test statistic is
p-value definition
The p-value is the probability, if H0
is true, that our experiment would
give a test statistic at least as
extreme as the test statistic we
observed.
We have a test
statistic equal to
1.00.
Also, the
alternative is
Ha: pf–pm ≠ 0.
“At least as extreme” means in
the direction determined by
the alternative hypothesis.
In this case, the p-value is P(Z ≥ 1.00 or Z ≤ –1.00).
Therefore, the p-value is 0.317.
Recall result from Lecture 08 (Sept. 15):
Are women more likely to have dogs?
Female
Male
Total
Has Dog No Dog
Total
89
56.7%
66
50.8%
68
43.3%
64
49.2%
157
155
132
287
130
Chi-square statistic: 1.003
P-value: 0.317
Note: There was
a mistake in the
Sept. 15
calculation!
Question from Midterm #2
Correct Answer: C
Answered correctly by 72.1%
Finding p-values using Minitab
In this case, the p-value is
P(Z ≥ 1.00 or Z ≤ –1.00).
To find this probability in Minitab, select
GraphProbability Distribution Plot:
We have a test
statistic equal to
1.00.
Also, the
alternative is
Ha: pf–pm ≠ 0.
Then, click “view probability”
and click OK.
Finding p-values using Minitab
In this case, the p-value is
P(Z ≥ 1.00 or Z ≤ –1.00).
Next, click “Shaded Area” and “Both Tails”.
We have a test
statistic equal to
1.00.
Also, the
alternative is
Ha: pf–pm ≠ 0.
Finding p-values using Minitab
In this case, the p-value is
P(Z ≥ 1.00 or Z ≤ –1.00).
Next, click “Shaded Area” and “Both Tails”.
We have a test
statistic equal to
1.00.
Also, the
alternative is
Ha: pf–pm ≠ 0.
Then, click to define shaded
area by “X value” and type
1.00 for the value.
Finding p-values using Minitab
In this case, the p-value is
P(Z ≥ 1.00 or Z ≤ –1.00).
Here is the result:
We have a test
statistic equal to
1.00.
Also, the
alternative is
Ha: pf–pm ≠ 0.
You have to add the two probabilities
together to get the p-value:
0.1587 + 0.1587 = 0.3164
Finding binomial probabilities using Minitab
Step 1: Select “Probability
Distribution Plot” and enter
the parameters.
Suppose that X is a
binomial random
variable with
parameters 5 and 0.25.
(Do you know what this
means?)
Use Minitab to find the
exact value of P(X ≥ 3).
Finding binomial probabilities using Minitab
Step 2: Under “Shaded area”,
select right tail and type 3.
(Why not 2?)
Suppose that X is a
binomial random
variable with
parameters 5 and 0.25.
(Do you know what this
means?)
Use Minitab to find the
exact value of P(X > 2).
Finding binomial probabilities using Minitab
Step 3: The answer is shown
below: 0.0135
Suppose that X is a
binomial random
variable with
parameters 5 and 0.25.
(Do you know what this
means?)
Use Minitab to find the
exact value of P(X > 2).
Which midterm #3 date do you prefer?
(A) Friday, Nov. 11
(B) Monday, Nov. 14
Keep these things in mind:
• Nov. 14 is three weeks from yesterday.
• Thanksgiving break begins on Monday, Nov. 21.
• Starting Nov. 28, we have two weeks left of class
Recall result from Lecture 08 (Sept. 15):
Are women more likely to have dogs?
Female
Male
Total
Has Dog No Dog
Total
89
56.7%
66
50.8%
68
43.3%
64
49.2%
157
155
132
287
130
Chi-square statistic: 1.003
P-value: ???
Let’s use Minitab to
find the p-value
directly from the
chi-square statistic.
Finding chi-square probabilities using Minitab
We have a chi-square
statistic of 1.003 for a
2x2 table.
Use Minitab to find the
corresponding p-value for
a test of independence
(recall that the null says
that the variables ARE
independent).
Finding chi-square probabilities using Minitab
Step 1: Choose the chisquare distribution and enter
1 degree of freedom.
We have a chi-square
statistic of 1.003 for a
2x2 table.
Use Minitab to find the
corresponding p-value for
a test of independence
(recall that the null says
that the variables ARE
independent).
Finding chi-square probabilities using Minitab
Step 2: Enter the value of the statistic
and be sure to click Right Tail (always
for chi-square!)
We have a chi-square
statistic of 1.003 for a
2x2 table.
Use Minitab to find the
corresponding p-value for
a test of independence
(recall that the null says
that the variables ARE
independent).
Finding chi-square probabilities using Minitab
Step 3: The p-value is 0.3166, as
shown in the plot below.
We have a chi-square
statistic of 1.003 for a
2x2 table.
Use Minitab to find the
corresponding p-value for
a test of independence
(recall that the null says
that the variables ARE
independent).
Why do we enter 1 “degree of freedom”?
Has Dog No Dog
Total
Female
89
68
157
Male
66
64
130
Total
155
132
287
Ans: Only one value is free to vary if we know the totals.
The other values are then automatic and not free.
How many d.f. in a 2x3 table? How about a 3x3 table?
Question from Midterm #2
Correct Answer: A
Answered correctly by 42.0%
Question from Midterm #2
Correct Answer: A
Answered correctly by 47.4%
Question from Midterm #2
Correct Answer: B
Answered correctly by 64.4%
Question from Midterm #2
Correct Answer: C
Answered correctly by 54.2%
If you understand today’s lecture…
12.60, 12.63, 12.65, 12.66
Objectives:
• Frame a 2x2 test of independence as a test of difference of
two proportions
• Apply ideas of forming hypotheses, calculating test statistics,
and calculating p-values.
• Use Minitab to find probabilities for normal, binomial, and chisquare distributions