You are on page 1of 51

HYPOTHESIS TESTING

April Andrea M. Valera


2016
Objectives
Determine Sample size
Develop Null and Alternative Hypothesis
Type I and Type II errors
Population Mean : s Known
Population Mean : s Unknown
Population Proportion
SAMPLE SIZE
Slovins Formula
n= N/(1+Ne2)
Let N be the population
And e as the error.
For instance 95% then the error is 5% (0.05).

E and e are NOT the same!


Slovins Formula Example
n= N/(1+Ne2)
Given a population of 1000, determine the adequate
sample size for a confidence level of 95%.

n= 1000/[1+1000(0.0025)]= 285.71
~286 samples.
Slovins Formula Example
n= N/(1+Ne2)
Given a population of 1000, determine the adequate
sample size for a confidence level of 90%.

n= 1000/[1+1000(0.01)]= 90.91
~ 91 samples.
Slovins Formula Example
n= N/(1+Ne2)
Given a population of 2500, determine the adequate
sample size for a confidence level of 95%.

n= 2500/[1+2500(0.0025)]= 344.83
~ 345 samples.
Slovins Formula Example
n= N/(1+Ne2)
Given a population of 5000, determine the adequate
sample size for a confidence level of 90%.

n= 5000/[1+5000(0.01)]= 98.04
~ 99 samples.
Hypothesis Testing
A statistical procedure that uses sample data to
determine whether a statement about the value
of a population parameter should or should not
be rejected.
The hypothesis testing procedure uses data from a
sample to test the two competing statements
indicated by H0 and Ha.
It takes time to formulate hypothesis correctly. The
proper choice is always confusing, but with proper
practice then you would get the hang of it.
Deduction

Hypothesis Predictions

Induction Observation

Testing
Source: Martyn Shuttleworth (2008) Hypothesis Testing
(Experiment Resources)
3 Types of Hypothesis Situations:
1. Testing Research Hypothesis
Scientists, Engineers, Chemist, etc.
2. Testing the Validity of a Claim
Veracity of your assumptions
3. Testing in Decision Making Situations
Manufacturers, Quality Control, Military, etc.
DEVELOP Ho AND Ha
Two Types of Hypothesis Testing:
1. Null Hypothesis (Ho) the hypothesis
assumed true in the testing procedure.
2. Alternative Hypothesis (HA) the hypothesis
concluded to be true and the test support.
Developing Null and Alternative Hypotheses
It is not always obvious how the null and alternative hypotheses
should be formulated.
Care must be taken to structure the hypotheses appropriately
so that the test conclusion provides the information the
researcher wants. The context of the situation is very important
in determining how the hypotheses should be stated.
In some cases it is easier to identify the alternative hypothesis
first. In other cases the null is easier.
Correct hypothesis formulation will take practice.
Developing Ho and Ha (when you want your
conclusion to Reject Ho):
Example: A new sales force Example: A new formula is
bonus plan is developed in an developed with the goal of
attempt to increase sales. lowering blood pressure more
than the existing drugs
Ha: The new bonus plan
formula.
increases sales.
Ha: The new formula lowers
Ho: The new bonus plan does
blood pressure more than the
not increase sales.
existing drug.
Ho: The new formula does not
lower blood pressure more
than the existing drug.
Developing Ho and Ha:
Example: The label on a soft Example: The size of a 12
drink bottle states that it ruler is 12.5 inches long.
contains at least 77 fluid
ounces.
Ho: The length is correct.
Ho: The label is correct.
m = 12.5 inches
m > 77 ounces

Ha: The length is incorrect.


Ha: The label is incorrect.
m =/= 12.5 inches
m < 77 ounces
Summary of Hypotheses Forms
H0 : o Upper Tail Test

HA : > o
H0 : o
Lower Tail Test
HA : < o
H0 : = o
HA : o
Two
Tailed
Test
Summary of Forms for Null and Alternative
Hypotheses about a Population Mean
The equality part of the hypotheses always
appears in the NULL hypothesis.
In general, a hypothesis test about the value of a
population mean m must take one of the following three
forms (where m0 is the hypothesized value of the
population mean).
Testing the Validity of a Claim
According to recent study, Mountain Dew is the third best selling
soft drink brand in the United States. The company stated that
their 2 liter containers are filled with an average or at least 67.6
fluids ounces. A sample will be measured to tests the
manufacturers claim.
Develop the null and alternative hypothesis

H0 : 67.6
HA : < 67.6
Note: Assume the manufacturers claim is true unless the sample
evidence is contradictory.
Testing in Decision Making Situations
You are the purchasing manager for a big construction company.
You ordered pipes from a supplier that required a mean length of
9 inches. Your construction manager specified that if it not 9
inches, then construction might have some quality problems.
Develop the null and alternative hypothesis

H0 : = 9
HA : 9
Note: In some cases, there are two courses of action especially on
specific numbers set.
Testing Research Hypothesis
A group of research students has developed a new fuel injection
system to increase miles per gallon of a car. Toyota wanted to
test that system by installing on their own car. Currently they
have an average fuel efficiency of 24 miles per gallon.
Develop the null and alternative hypothesis

H0 : 24
HA : > 24
Note: Research wants evidence to conclude that the new system
increases the mean miles per gallon.
Type I and Type II Errors
a. Type I Error The error of rejecting Ho when it is true
b. Type II Error The error of accepting Ho when it is
false.

Ho True Ha True
Correct
Accept Ho Type II Error
Conclusion
Correct
Reject Ho Type I Error
Conclusion
Guilty or Not Guilty
Ho is True Ha is True
Not Guilty Guilty
Accept Ho Right Type II Error
Acquittal Decision
Reject Ho Type I Error Right
Conviction Decision
One doesnt want to convict an innocent defendant, error of the first kind.
Error of the second kind is setting a guilty person free.
Level of Significance
is the probability of making a Type I error when the null
hypothesis is true as an equality
The Greek symbol (alpha) is used to denote the level of
significance. Most common choice is .05 and .01.
Significance Tests applications of hypothesis testing
that only control for the Type I error.
Note: if the sample data are consistent with the null hypothesis, the
conclusion Do Not Reject Ho is preferred.
Test Statistic
is a statistic whose value helps determine whether a null
hypothesis should be rejected. (z or t)
How small must the test statistic z be before we choose
to reject the null hypothesis?
There are two approaches:
1. P value approach
2. Critical value approach
P Value Approach
P value approach is a probability that provides a
measure of the evidence against the null hypothesis
provided by the sample
Smaller p values indicate more evidence against Ho.
A small p value indicates the value of the test statistic is
unusual given that Ho is true.
Steps of Hypothesis Testing p-value approach
In Words In Symbols
1. Develop the null and alternative hypotheses. Ho and Ha
2. Specify the level of significance (alpha) [.05 or .01]
3. Identify the test statistic to be used whether the population
is either known or unknown [z or t]
4. Use the value of the test statistic to compute for the p value
5. Reject Ho if the p value p value
Critical Value Approach
Critical Value Approach is a value that is compared
with the test statistic to determine whether Ho should be
rejected.
It is the value of the test statistic that corresponds to an
area of (the level of significance) in the lower tail of the
sampling distribution.
It is the largest value of the test statistic that will result
in the rejection of the null hypothesis
Steps of Hypothesis Testing Critical Value approach
In Words In Symbols
1. Develop the null and alternative hypotheses. Ho and Ha
2. Specify the level of significance (alpha) [.05 or .01]
3. Identify the test statistic to be used whether the population
is either known or unknown [z or t]
4. Use the level of significance to determine the critical value
and the rejection rule
5. Use the value accordingly with the rejection rule for z
Summary of Hypotheses Forms
H0 : o Upper Tail Test

HA : > o
H0 : o
Lower Tail Test
HA : < o
H0 : = o
HA : o
Two
Tailed
Test
Computation of p Values
for One Tailed Tests
1. Compute the value of the test statistic z
2. Lower Tail Test: Compute the area under the standard normal
curve to the left of the statistic. {Ha: <}
3. Upper Tail Test: Compute the area under the standard normal
curve to the right of the test statistic. {Ha: >} [1 left area = p
value]
4. Use the Normal Distribution table with the computed value.
(e.g. -2.67 ~ 2.6 on the left column and .07 on the 1st row)
[0.0038]
Computation of p Values
for Two Tailed Tests
1. Compute the value of the test statistic z
2. If the value of the test statistic is in the upper tail (z > 0), find
the area under the standard normal curve to the right of z. If
the value of the test statistic is in the lower tail (z < 0), find the
area under the standard normal curve to the left of z.
3. Double the tail area or probability (x2) to obtain the p value
{e.g. 2(.0038) = .0076}
s Known
Test Statistics:
s Known


=

Lower Tail Test

HYPOTHESIS H0 : o
HA : < o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if z -z
Upper Tail Test

HYPOTHESIS H0 : o
HA : > o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if z z
Two Tailed Test

HYPOTHESIS H0 : = o
HA : o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if z z/2 or z -z/2
One-Tailed Tests About a Population Mean:
s Known
Example: Metro EMS
The response times for a random sample of 40 medical
emergencies were tabulated. The sample mean is 13.25 minutes.
The population standard deviation is believed to be 3.2 minutes.
The EMS director wants to perform a hypothesis test, with a .05
level of significance, to determine whether the service goal of 12
minutes or less is being achieved.
One-Tailed Tests About a Population Mean:
s Known
Given: H0: m Ha: m
= 13.25 a = .05
= 12 For z = 2.47, cumulative probability = .9932.

= 3.2 pvalue = 1 - .9932 = .0068

= 40 Because pvalue = .0068 < a = .05, we reject H0.


There is sufficient statistical evidence
a = .05 to infer that Metro EMS is not meeting
the response goal of 12 minutes.
One-Tailed Tests About a Population Mean:
s Known
Example: Philips Electronics
Philips Electronics claims that they have developed a new energy
saving light bulb that consumes an average of no more than 25
watts. Previous researches inferred that the standard deviation
is 6 watts. A group of concerned consumers decided to verify if
such claim is true. They took a sample of 40 light bulbs and
found out that they consume an average of 26.4.
One-Tailed Tests About a Population Mean:
s Known
Given: H0: m 5 Ha: m5
= 26.4 a = .01
= 25 For z = 1.48, cumulative probability = .9306.

=6 pvalue = 1 - .9306 = .0694

= 40 Because pvalue = .0694 > a = .05, we do not


reject H0.
a = .05 Reject Ho if z 2.33, since 1.48 < 2.33 then your
conclusion is do not reject Ho
s Unknown
Test Statistics:
s Unknown


=

Lower Tail Test

HYPOTHESIS H0 : o
HA : < o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if t -t
Upper Tail Test

HYPOTHESIS H0 : o
HA : > o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if t t
Two Tailed Test

HYPOTHESIS H0 : = o
HA : o

Test Statistic

Reject Ho if P Value
p value approach

Critical Value
approach Reject Ho if t t/2 or t -t/2
One-Tailed Tests About a Population Mean:
s Unknown
Example: Sunflower seedling Vinca Minor
A biologist was interested in determining whether sunflower
seedlings treated with an extract from Vinca minor roots
resulted in a lower average height of 15.7cm.
The biologist treated a random sample of 23 seedlings with the
extract and subsequently obtained a mean of 13.66 and a
standard deviation of 2.54.
Perform a hypothesis test, with a .05 level of significance, to
determine whether the average height is lowered by the extract.
One-Tailed Tests About a Population Mean:
s Unknown
Given: H0: m 5.7 Ha: m 5.7
= 13.66 a = .05
= 15.7 t = -3.8517

= 2.54 t 22, .025 = 2.074

=23
a = .05
One-Tailed Tests About a Population Mean:
s Unknown
Example: King Penguins
Suppose the mean weight of King Penguins found in an Antarctic
colony last year was 15.4kg. This year, in a sample of 25
penguins, the mean penguin weight is 14.6kg. Assume the
sample standard deviation is 2.5 kg.
At .05 significance level, can we reject the null hypothesis that the
mean penguin weight does not differ from last year?
One-Tailed Tests About a Population Mean:
s Unknown
Given: H0: m = 5.4 Ha: m =/=5.7
= 14.6 a = .05
= 15.4 t = -1.6

= 2.5 t 24, .025 = 2.064

=25
a = .05

You might also like