Professional Documents
Culture Documents
HYPOTHESIS TESTING
• A hypothesis is a statement or assertion
about the state of nature (about the true
value of an unknown population parameter):
The accused is innocent
= 100
• Every hypothesis implies its contradiction
or alternative:
The accused is guilty
100
• A hypothesis is either true or false, and
you may fail to reject it or you may reject
it on the basis of sample data
Types of Hypothesis Testing
The null hypothesis, H0
Often represents the status quo situation or an
existing belief.
Is maintained, or held to be true, until a test
leads to its rejection in favor of the alternative
hypothesis.
We hold to be true until we have sufficient
statistical evidence to conclude otherwise.
Mathematically stated by equality signs
(Greater or equal, less or equal and equality)
Is accepted as true or rejected as false on the
basis of a consideration of a test statistic.
Alternative hypothesis, H1 or Ha
A two-tailed test
Steps in Hypothesis Testing
1. State the null and alternative hypothesis
2. Set decision rule:
Based on level of significance and degrees of
freedom
3. Compute the test statistic and compare with values
obtained in step 2
A test statistics z, or t depending the sample size
and standard deviation
4. Arrive at decision:
• Do not reject or reject HO
The p-Value approach
• The p-value is the probability of obtaining a value of
the test statistic as extreme as, or more extreme than,
the actual value obtained, when the null hypothesis is
true.
s 5
H0: = 28 x z 315
. 1.96
n 100
. 025
H1: 28
. .98 30.52, 32.48
315
Collect sample data: We can be 95% sure that the average time
n = 100 for all packages is between 30.52 and 32.48
minutes.
= 31.5
Since the asserted value, 28 minutes, is
s=5 not in this 95% confidence interval, we
Construct a 95% confidence interval may reasonably reject the null
for the average delivery times of all hypothesis.
packages:
Example: An automatic bottling machine fills cola into two liter
(2000 ml) bottles. A consumer advocate wants to test if the the
average amount filled by the machine into a bottle is less than 2000
ml. A random sample of 40 bottles coming out of the machine was
selected and the exact content of the selected bottles are recorded.
The sample mean was 1999.6 ml. The population standard
deviation is known from past experience to be 1.30 ml. Compute
the p-value for this test.
H0: 2000
H1: 2000
n = 40, = 2000,
= 1999.6,
𝑥
¯ − 𝜇0
= 1.3 𝑧=
𝜎
√𝑛
The test statistic is:
Testing Population Means
CASE I:
x 0
0.3
.025 .025
z 0.2
n -1.96 1.96 z
z = 0.1
s 7.8 0.0
-1.96 1.96 z
n 144
Lower Rejection Non-rejection Upper Rejection
2.6 Region
Region Region
= 4
0.65
Since the test statistic falls in the upper rejection region, H0 is rejected, and
we may conclude that the average amount of carry-on baggage is more than
12 kgs.
Example: The average time it takes a computer to perform a
certain task is believed to be 3.24 seconds. It was decided to test
the statistical hypothesis that the average performance time of
the task using the new algorithm is the same, against the
alternative that the average performance time is no longer the
same, at the 0.05 level of significance. In a random sample of
200 tasks, the average time found to be 3.48 seconds with a
standard deviation of 2.8 seconds.
H0: = 3.24
H1: 3.24
0.8
0.7 .95
0.6
0.5
0.4
0.3
.025 .025
0.2
0.1
0.0
-1.96 1.96 z
𝑇h𝑒𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝑓𝑜𝑟𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑖𝑛𝑔𝑡𝑖𝑠:
Example: According to the Japanese National Land Agency,
average land prices in central Tokyo soared 49% in the first six
months of 1995. An international real estate investment company
wants to test this claim against the alternative that the average price
did not rise by 49%, at a 0.01 level of significance.
H0: = 49
H1: 49
n = 18
For = 0.01 and (18-1) = 17 df ,
critical values of t are ±2.898
x 0
t
s
The test statistic is:
n
0 .8
0 .7 .99
0 .6
0 .5
0 .4
0 .3
.005 .005
0 .2
0 . 1
0 .0
-2.898 2.898 t
0 .5
0 .4
0 .3
.025 .025
0 .2
0.1
0 .0
-2.069 2.069 t
Lower Rejection Non-rejection Upper Rejection
Region Region Region
Since the test statistic falls in the non rejection region, is not rejected,
and we may not conclude that the average speed is different from 27
copies per minute.
Hypothesis Tests for Population Proportions
Step 2: Decision Rule: Select the level of Significance and the critical
values or determine the P-value
• The critical value for a right-tailed test at 0.05 level is 1.65
Step 3: compute the test statistics
1.60
A z-score of 1.6 corresponds to a probability of 0.4452, the
unemployment rate (0.0489) is higher than 0.0548 (0.5 -
0.4452)
1.60, this is higher than 0.05, which means that it’s not
significant at 0.05 level of significance.
You could have also compared the z-score of 1.6 to determine
if it’s significant at the 0.05 level
Since 1.6 is not greater than 1.65, this tells you that it is not
significant at the 0.05 level
You could have also compared the z-score of 1.6
to determine if it’s significant at the 0.05 level
Since 1.6 is not greater than 1.65, this tells you
that it is not significant at the 0.05 level
Step 4: Decision: reject or Do not reject
Since an unemployment rate of 0.0489 is not
significant at the 0.05 level, this tells us that we
should NOT reject the null hypothesis
In other words, there is not enough evidence to
support the claim that this particular county has
an unemployment rate higher than the national
average
Hypothesis Tests for Population Proportions
Example : A random sample of n = 750 people is selected, of
whom 92 are left-handed. Use these sample data to test the
claim that 10% of the population is left handed. Use a P-value
approach.
Step 1: Write the null and alternative hypotheses
H 0 : p .10 H a : p .10
Step 2: Draw a sample and come up with a sample statistic
and the standard deviation of that sample
n = 750
The sample proportion is:
The standard deviation is:
92
pˆ 0.12267
750
0 .3
f(z)
0 .2
0.1
0 .0
-5 0 5
-0.4 0.4
z