Professional Documents
Culture Documents
Hypothesis Testing
Hypothesis Testing
TESTING
.1 NULL AND ALTERNATIVE HYPOTHESES
2 TEST STATISTIC
3 P-VALUE
4 SIGNIFICANCE LEVEL
5 ONE-SAMPLE Z TEST
6 POWER AND SAMPLE SIZE
Terms Introduce in Prior Chapter
Vary No Yes
Calculated No Yes
Sampling Distributions of a Mean (Introduced in
Ch 8)
The sampling distributions of a mean (SDM)
describes the behavior of a sampling mean
x ~ N , SE x
where SE x
n
Hypothesis Testing
Is also called significance testing
Tests a claim about a parameter using evidence (data in a sample)
The technique is introduced by considering a one-sample z test
The procedure is broken into four steps
Each element of the procedure must be understood
Hypothesis Testing Steps
A. Null and alternative hypotheses
B. Test statistic
C. P-value and interpretation
D. Significance level (optional)
Null and Alternative Hypotheses
x 0 173 170
zstat 0.60
SE x 5
Illustrative Example: z statistic
If we found a sample mean of 185, then
x 0 185 170
zstat 3.00
SE x 5
Reasoning Behinµzstat
x ~ N 170,5
Sampling distribution of xbar
under H0: µ = 170 for n = 64
P-value
This means that if the likeliness of getting the sample score is less
than alpha or the threshold p-value, we consider it significantly
different from the population, or even belonging to some new
sample distribution.
Consider the above normal distribution again. The red point in this distribution
represents the alpha value or the threshold p-value. Now, let’s say that the green and
orange points represent different sample results obtained after an experiment.
We can see in the plot that the leftmost green point has a p-value greater than the
alpha. As a result, these values can be obtained with fairly high probability and
the sample results are regarded as lucky.
The point on the rightmost side (orange) has a p-value less than the alpha value (red).
As a result, the sample results are a rare outcome and very unlikely to be lucky.
Therefore, they are significantly different from the population.
The alpha value is decided depending on the test being performed. An alpha value of
0.05 is considered a good convention if we are not sure of what value to consider.
The smaller the value of alpha we consider, the harder it is to consider the results
as significant.
P-value < alpha
alpha value.
This is basically the threshold p-
value
. We can clearly see that the area
under the
curve
to the right of the threshold is
very low.
The orange point represents the
p-value using the sample
population. In
this case, we can clearly see that
the
p-value is less than the alpha value
The results obtained from the sample is an extremity of the population
distribution (an extremely rare event), and hence there is a good chance it
may belong to some other distribution (as shown below)
Right – I feel you should answer this question before reading
further. Now that you know the other side of this coin, you will be
able to think of the outcome of this scenario.
p-value greater than the alpha means that the results are in favor of
the null hypothesis and therefore we fail to reject it. This result is
often against the alternate hypothesis (obtained results are from
another distribution) and the results obtained are not significant
and simply a matter of chance or luck.
Again, consider the same population distribution curve with the
red point as alpha and the orange point as the calculated p-value
from the sample:
So, p-value > alpha (considering the area under the curve to
the right-hand side of the red and the orange points) can be
interpreted as follows
The sample results are just a low probable event of the
population distribution and are very likely to be obtained by
luck.
We can clearly see that the area under the population curve to
the right of the orange point is much larger than the alpha
value. This means that the obtained results are more likely to
be part of the same population distribution than being a part of
some other distribution.
Example of p-value in Statistics
• Population Mean = 74
• Population Standard Deviation = 8 (Historical data of the last
10 years is associated to the population)
• Sample Mean = 78
• Sample Size = 60 (Here, the sample is associated with the
archers who practiced breathing exercises and meditation)
We have the population mean and standard deviation with us
and the sample size is over 30, which means we will be using
the Z-test.
According to the problem above, there can be two possible
conditions:
1. The after-experiment results are a matter of luck, i.e. mean
before and after experiment are similar. This will be our “Null
Hypothesis”
2. The after-experiment results are indeed very different from the
pre-experiment ones. This will be our “Alternate Hypothesis”
Step 2: Calculating the Z-Score
• X = Population Mean
• M = Sample Mean
• Sigma = Population Standard Deviation
• n = number of sample instances
On plugging in the corresponding values, Z-Score comes out
to be – 3.87.
Step 3: Referring to the Z-table and
finding the p-value:
The probability that we obtained is to the left of the Z-score (Red Point)
which we calculated. The value 0.999 represents the “total probability” of
getting a result “less than the sample score 78”, with respect to the
population.
For this, we will use the fact that the total area under the normal Z
distribution is 1. Therefore the area to the right of Z-score (or p-value
represented by the unshaded region) can be calculated as:
p-value = 1 – 0.999
p-value = 0.001
0.001 (p-value) is the unshaded area to the right of the red point. The
value 0.001 represents the “total probability” of getting a result “greater
than the sample score 78”, with respect to the population.
Step 4: Comparing p-value and alpha
value:
We were not given any value for alpha, therefore we can consider alpha =
0.05. According to our understanding, if the likeliness of obtaining the
sample (p-value) result is less than the alpha value, we consider the sample
results obtained as significantly different.
We can clearly see that the p-value is far less than the alpha value:
0.001 (red region) << 0.5 (orange region)
This says that the likeliness of obtaining the mean as 78 is a rare event with
respect to the population distribution. Therefore, it is convenient to say
that the increase in the performance of the archers in the sample
population is not the result of luck. The sample population belongs to
some other (better in this case) distribution of itself.