Calculating a Two-Sample Z
Test by Hand
Here is the problem you just saw in a previous
presentation. Follow along doing the calculations on
your own problem as you view this one.
Here is the problem you just saw in a previous
presentation. Follow along doing the calculations on
your own problem.
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
What are the researchers asking here?
What are the researchers asking here?
They are trying to determine if there is a difference in
reported anxiety symptoms between those taking the
new anti-anxiety drug and those taking the placebo.
What are the researchers asking here?
They are trying to determine if there is a difference in
reported anxiety symptoms between those taking the
new anti-anxiety drug and those taking the placebo.
What makes this question one that can be answered
using a two-sample Z test is the fact that we are
examining the difference between proportions (64 out
of 200 or .32 compared to 92 out 200 or .46).
What are the researchers asking here?
They are trying to determine if there is a difference in
reported anxiety symptoms between those taking the
new anti-anxiety drug and those taking the placebo.
What makes this question one that can be answered
using a two-sample Z test is the fact that we are
examining the difference between proportions (64 out
of 200 or .32 compared to 92 out 200 or .46).
Are these differences similar enough to make any
differences we would find if we were to repeat the
experiment to be due to chance or not?
With that in mind, we are able to state the null-
hypothesis and then determine if we will reject or fail
to reject it:
With that in mind, we are able to state the null-
hypothesis and then determine if we will reject or fail
to reject it:
There is NO significant proportional difference in
reported anxiety symptoms between a sample of
participants who took a new anti-anxiety drug and a
sample who took a placebo.
Since the test uses a .05 alpha value, that is what we
will use to determine if the probability of a meaningful
difference is rare or common.
Since the test uses a .05 alpha value, that is what we
will use to determine if the probability of a meaningful
difference is rare or common.
The alpha value makes it possible to determine what is
called the z critical. If the z statistic that we are about
to calculate from the data in the question is outside of
the z critical [for a one-tailed test (e.g., +1.64) or a two-
tailed test (e.g., -1.96 or +1.96]
One tailed test visual depiction:
rarecommon
+1.64
If the z value we
are about to
calculate lands
above this point,
we will reject the
null hypothesis
One tailed test visual depiction:
rarecommon
+1.64
If the z value lands
below this point
we will fail to
reject the null
hypothesis
A one tailed test could also go the other direction if we
are testing the probability of one sample having a
smaller proportion than another.
rare common
-1.64
A two-tailed test implies that we are not sure as to
which direction it will go. We don’t know if the
placebo or the new anxiety medicine will have better
results.
Here is a visual depiction of the two-tailed test.
rare
-1.96
Common rare
+1.96
All we have left to do now is calculate the z statistic.
All we have left to do now is calculate the z statistic.
Here is the formula for the z statistic for a Two-Sample
Z-Test:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
( 𝑝1 − 𝑝2)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
( 𝑝1 − 𝑝2)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
( 𝑝1 − 𝑝2)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
( 𝑝1 − 𝑝2)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
( 𝑝1 − 𝑝2)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
92/200=.46
64/200=.32
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(.32 − .46)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
92/200=.46
64/200=.32
In the numerator we are subtracting one sample
proportion from another sample proportion:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−. 𝟏𝟐)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
The denominator is the estimated standard error:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−.12)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
This proportion is
called the pooled
standard deviation.
It is the same value
we use with
independent
sample t-tests.
The denominator is the estimated standard error:
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−.12)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
It is interesting to note that when you multiply a
proportion (.80) by its complement (1-.8 = .20)
you get the variance (.80*.20 = .16).
If you square that amount it comes to .04 and that
is the standard deviation.
Why is this important? Because the standard deviation
divided by the square root of the sample size is the
standard error.
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−.12)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
It is interesting to note that when you multiply a
proportion (.80) by its complement (1-.8 = .20)
you get the variance (.80*.20 = .16).
If you square that amount it comes to .04 and that
is the standard deviation.
And the larger the standard error the less likely the two
groups will be statistically significantly different.
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−.12)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
It is interesting to note that when you multiply a
proportion (.80) by its complement (1-.8 = .20)
you get the variance (.80*.20 = .16).
If you square that amount it comes to .04 and that
is the standard deviation.
Conversely, the smaller the standard error the more
likely the two groups will be statistically significantly
different.
𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 =
(−.12)
𝑝 1 − 𝑝
1
𝑛1
+
1
𝑛2
It is interesting to note that when you multiply a
proportion (.80) by its complement (1-.8 = .20)
you get the variance (.80*.20 = .16).
If you square that amount it comes to .04 and that
is the standard deviation.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
𝑥1 + 𝑥2
𝑛1 + 𝑛2
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
𝑥1 + 𝑥2
𝑛1 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
Here’s the problem again:
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
𝑥1 + 𝑥2
𝑛1 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 𝑥2
𝑛1 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 𝑥2
𝑛1 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 𝑥2
200 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 𝑥2
200 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 92
200 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 92
200 + 𝑛2
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
So, let’s compute the pooled standard deviation:
𝒑 1 − 𝒑 𝒑 =
64 + 92
200 + 200
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
Add the fractions:
𝒑 1 − 𝒑 𝒑 =
64 + 92
200 + 200
Add the fractions:
𝒑 1 − 𝒑 𝒑 =
156
200 + 200
Add the fractions:
𝒑 1 − 𝒑 𝒑 =
156
200 + 200
Add the fractions:
𝒑 1 − 𝒑 𝒑 =
156
200
Add the fractions:
𝒑 1 − 𝒑 𝒑 = .78
Now we plug this pooled proportion:
𝒑 1 − 𝒑 𝒑 = .78
Now we plug this pooled proportion:
into the standard error formula in the denominator
𝒑 1 − 𝒑 𝒑 = .78
Now we plug this pooled proportion:
into the standard error formula in the denominator
𝒑 1 − 𝒑 𝒑 = .78
Now we plug this pooled proportion:
into the standard error formula in the denominator
.78 1−. 𝟕𝟖 𝒑 = .78
Now we plug this pooled proportion:
into the standard error formula in the denominator
.78 .22
Now we plug this pooled proportion:
into the standard error formula in the denominator
. 𝟏𝟕𝟐
Now we plug this pooled proportion:
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
. 𝟏𝟕𝟐
1
𝒏 𝟏
+
1
𝑛2
Now we need to calculate n or the sample size:
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172
1
200
+
1
𝑛
Now we need to calculate n or the sample size:
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172
1
200
+
1
200
Researchers want to test the effectiveness of a new anti-
anxiety medication. In clinical testing, 64 out of 200 people
taking the medication report symptoms of anxiety. Of the
people receiving a placebo, 92 out of 200 report symptoms of
anxiety. Is the medication working any differently than the
placebo? Test this claim using alpha = 0.05.
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172
1
200
+
1
200
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172
2
200
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172
1
100
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172 .01
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.172 (.1)
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
(.414) (.1)
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 =
(−. 𝟏𝟒)
.0414
Now we need to calculate the Zstatistic
Now we need to calculate the Zstatistic
𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = −3.379
Let’s see where this lies in the distribution:
rare
-1.96
Common rare
+1.96
Let’s see where this lies in the distribution:
rare
-1.96
Common rare
+1.96-3.38
Because -3.38 is outside the -1.96 range we consider it
to be a rare occurrence and therefore we will reject the
null hypothesis and accept the alternative hypothesis:
Because -3.38 is outside the -1.96 range we consider it
to be a rare occurrence and therefore we will reject the
null hypothesis and accept the alternative hypothesis:
There was a significant difference in effectiveness between the
medication group and the placebo group, z = -3.379, p < 0.05.

Calculating a two sample z test by hand

  • 1.
  • 2.
    Here is theproblem you just saw in a previous presentation. Follow along doing the calculations on your own problem as you view this one.
  • 3.
    Here is theproblem you just saw in a previous presentation. Follow along doing the calculations on your own problem. Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 4.
    What are theresearchers asking here?
  • 5.
    What are theresearchers asking here? They are trying to determine if there is a difference in reported anxiety symptoms between those taking the new anti-anxiety drug and those taking the placebo.
  • 6.
    What are theresearchers asking here? They are trying to determine if there is a difference in reported anxiety symptoms between those taking the new anti-anxiety drug and those taking the placebo. What makes this question one that can be answered using a two-sample Z test is the fact that we are examining the difference between proportions (64 out of 200 or .32 compared to 92 out 200 or .46).
  • 7.
    What are theresearchers asking here? They are trying to determine if there is a difference in reported anxiety symptoms between those taking the new anti-anxiety drug and those taking the placebo. What makes this question one that can be answered using a two-sample Z test is the fact that we are examining the difference between proportions (64 out of 200 or .32 compared to 92 out 200 or .46). Are these differences similar enough to make any differences we would find if we were to repeat the experiment to be due to chance or not?
  • 8.
    With that inmind, we are able to state the null- hypothesis and then determine if we will reject or fail to reject it:
  • 9.
    With that inmind, we are able to state the null- hypothesis and then determine if we will reject or fail to reject it: There is NO significant proportional difference in reported anxiety symptoms between a sample of participants who took a new anti-anxiety drug and a sample who took a placebo.
  • 10.
    Since the testuses a .05 alpha value, that is what we will use to determine if the probability of a meaningful difference is rare or common.
  • 11.
    Since the testuses a .05 alpha value, that is what we will use to determine if the probability of a meaningful difference is rare or common. The alpha value makes it possible to determine what is called the z critical. If the z statistic that we are about to calculate from the data in the question is outside of the z critical [for a one-tailed test (e.g., +1.64) or a two- tailed test (e.g., -1.96 or +1.96]
  • 12.
    One tailed testvisual depiction: rarecommon +1.64 If the z value we are about to calculate lands above this point, we will reject the null hypothesis
  • 13.
    One tailed testvisual depiction: rarecommon +1.64 If the z value lands below this point we will fail to reject the null hypothesis
  • 14.
    A one tailedtest could also go the other direction if we are testing the probability of one sample having a smaller proportion than another. rare common -1.64
  • 15.
    A two-tailed testimplies that we are not sure as to which direction it will go. We don’t know if the placebo or the new anxiety medicine will have better results.
  • 16.
    Here is avisual depiction of the two-tailed test. rare -1.96 Common rare +1.96
  • 17.
    All we haveleft to do now is calculate the z statistic.
  • 18.
    All we haveleft to do now is calculate the z statistic. Here is the formula for the z statistic for a Two-Sample Z-Test: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = ( 𝑝1 − 𝑝2) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2
  • 19.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = ( 𝑝1 − 𝑝2) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2
  • 20.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = ( 𝑝1 − 𝑝2) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 21.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = ( 𝑝1 − 𝑝2) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 22.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = ( 𝑝1 − 𝑝2) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 92/200=.46 64/200=.32
  • 23.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (.32 − .46) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 92/200=.46 64/200=.32
  • 24.
    In the numeratorwe are subtracting one sample proportion from another sample proportion: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−. 𝟏𝟐) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 25.
    The denominator isthe estimated standard error: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−.12) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. This proportion is called the pooled standard deviation. It is the same value we use with independent sample t-tests.
  • 26.
    The denominator isthe estimated standard error: 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−.12) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 It is interesting to note that when you multiply a proportion (.80) by its complement (1-.8 = .20) you get the variance (.80*.20 = .16). If you square that amount it comes to .04 and that is the standard deviation.
  • 27.
    Why is thisimportant? Because the standard deviation divided by the square root of the sample size is the standard error. 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−.12) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 It is interesting to note that when you multiply a proportion (.80) by its complement (1-.8 = .20) you get the variance (.80*.20 = .16). If you square that amount it comes to .04 and that is the standard deviation.
  • 28.
    And the largerthe standard error the less likely the two groups will be statistically significantly different. 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−.12) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 It is interesting to note that when you multiply a proportion (.80) by its complement (1-.8 = .20) you get the variance (.80*.20 = .16). If you square that amount it comes to .04 and that is the standard deviation.
  • 29.
    Conversely, the smallerthe standard error the more likely the two groups will be statistically significantly different. 𝒁 𝒔𝒕𝒂𝒕𝒊𝒔𝒕𝒊𝒄 = (−.12) 𝑝 1 − 𝑝 1 𝑛1 + 1 𝑛2 It is interesting to note that when you multiply a proportion (.80) by its complement (1-.8 = .20) you get the variance (.80*.20 = .16). If you square that amount it comes to .04 and that is the standard deviation.
  • 30.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑
  • 31.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 𝑥1 + 𝑥2 𝑛1 + 𝑛2
  • 32.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 𝑥1 + 𝑥2 𝑛1 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. Here’s the problem again:
  • 33.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 𝑥1 + 𝑥2 𝑛1 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 34.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 𝑥2 𝑛1 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 35.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 𝑥2 𝑛1 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 36.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 𝑥2 200 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 37.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 𝑥2 200 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 38.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 92 200 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 39.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 92 200 + 𝑛2 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 40.
    So, let’s computethe pooled standard deviation: 𝒑 1 − 𝒑 𝒑 = 64 + 92 200 + 200 Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05.
  • 41.
    Add the fractions: 𝒑1 − 𝒑 𝒑 = 64 + 92 200 + 200
  • 42.
    Add the fractions: 𝒑1 − 𝒑 𝒑 = 156 200 + 200
  • 43.
    Add the fractions: 𝒑1 − 𝒑 𝒑 = 156 200 + 200
  • 44.
    Add the fractions: 𝒑1 − 𝒑 𝒑 = 156 200
  • 45.
    Add the fractions: 𝒑1 − 𝒑 𝒑 = .78
  • 46.
    Now we plugthis pooled proportion: 𝒑 1 − 𝒑 𝒑 = .78
  • 47.
    Now we plugthis pooled proportion: into the standard error formula in the denominator 𝒑 1 − 𝒑 𝒑 = .78
  • 48.
    Now we plugthis pooled proportion: into the standard error formula in the denominator 𝒑 1 − 𝒑 𝒑 = .78
  • 49.
    Now we plugthis pooled proportion: into the standard error formula in the denominator .78 1−. 𝟕𝟖 𝒑 = .78
  • 50.
    Now we plugthis pooled proportion: into the standard error formula in the denominator .78 .22
  • 51.
    Now we plugthis pooled proportion: into the standard error formula in the denominator . 𝟏𝟕𝟐
  • 52.
    Now we plugthis pooled proportion: Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) . 𝟏𝟕𝟐 1 𝒏 𝟏 + 1 𝑛2
  • 53.
    Now we needto calculate n or the sample size: Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) .172 1 200 + 1 𝑛
  • 54.
    Now we needto calculate n or the sample size: Researchers want to test the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) .172 1 200 + 1 200
  • 55.
    Researchers want totest the effectiveness of a new anti- anxiety medication. In clinical testing, 64 out of 200 people taking the medication report symptoms of anxiety. Of the people receiving a placebo, 92 out of 200 report symptoms of anxiety. Is the medication working any differently than the placebo? Test this claim using alpha = 0.05. 𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) .172 1 200 + 1 200 Now we need to calculate the Zstatistic
  • 56.
  • 57.
  • 58.
    𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) .172.01 Now we need to calculate the Zstatistic
  • 59.
    𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) .172(.1) Now we need to calculate the Zstatistic
  • 60.
    𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = (−. 𝟏𝟒) (.414)(.1) Now we need to calculate the Zstatistic
  • 61.
  • 62.
    Now we needto calculate the Zstatistic 𝑍𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐 = −3.379
  • 63.
    Let’s see wherethis lies in the distribution: rare -1.96 Common rare +1.96
  • 64.
    Let’s see wherethis lies in the distribution: rare -1.96 Common rare +1.96-3.38
  • 65.
    Because -3.38 isoutside the -1.96 range we consider it to be a rare occurrence and therefore we will reject the null hypothesis and accept the alternative hypothesis:
  • 66.
    Because -3.38 isoutside the -1.96 range we consider it to be a rare occurrence and therefore we will reject the null hypothesis and accept the alternative hypothesis: There was a significant difference in effectiveness between the medication group and the placebo group, z = -3.379, p < 0.05.