Sunteți pe pagina 1din 29

Hypothesis Testing

Statistical inference  generalizing from


a sample to a population with calculated
degree of certainty
Two forms of statistical inference
– Hypothesis testing
– Estimation
• Statistical Hypothesis: is simply a
statement about probability
distributions associated with the
population.
• Hypothesis Testing: Procedures that
enables us to decide whether to reject or
accept hypothesis, based on the
information contained in a sample are
called statistical tests/hypothesis tests,
Hypothesis Testing

In general we can not prove that an hypothesis is


absolutely true or false. If the information
furnished by the data support the hypothesis , then
do not reject it and otherwise we reject it.
Null Hypothesis: denoted by H0 , Which is a
claim(about a probability distribution ) that we
are interested in rejecting or refuting.
Another hypothesis contradictory to the null
hypothesis is called Alternative Hypothesis , HA.

If we accept H0 we automatically reject HA and vice versa.


Procedure of Hypothesis Testing

To test a hypothesis , sample data are collected and used to


calculate a test statistic. Depending on the value of this
statistic the null hypothesis Ho is accepted or rejected.

Critical Region for Ho is defined as the range of values of


the test statistic that corresponds to a rejection of the
hypothesis.
Procedure of Hypothesis Testing

Steps are:
 Formulate a null hypothesis and alternative hypothesis.
 Choose a level of significance α for the test
 Calculate the value of test statistic from random sample of
data.
p-Value Approach
• Use the value of the test statistic to compute the
p-value.
• Reject H0 if p-value < a
.
Procedure of Hypothesis Testing

Critical Value Approach


• Use the level of significance to determine the
critical/rejection region –that place which is not
likely if null is true

• Use the value of the test statistic and the rejection


rule to determine whether to reject H0.

 Find whether statistic falls inside or outside the rejection


region. If statistic falls in the rejection region, reject Ho
otherwise accept it.
Types of errors
It is possible to make an error in accepting or
rejecting any given hypothesis.
Type I error: occurs when a true null hypothesis Ho
is rejected. The Greek letter α will denote the
probability of rejecting Ho when it is true. The
term α is referred to as the level of significance of
the test.
Type II error: consists of accepting Ho when it is
false. The symbol β is used to represent the
probability of making type II error.
Types of errors
An error of type I or type II leads to a wrong
decision, so we must attempt to minimize these
errors. But as α decreases , β tends to increase.
The reverse is also true.
The only way to simultaneously reduce both types of
error is to increase the sample size.

Power of Test: is defines as the probability of


rejecting Ho when it is false. That is 1- β.
One Tailed and Two Tailed test

 In general, a hypothesis test about the value of a


population mean  must take one of the following
three forms (where 0 is the hypothesized value of
the population mean).

H 0 :   0 H 0 :   0 H 0 :   0
H a :   0 H a :   0 H a :   0

One-tailed One-tailed Two-tailed


(lower-tail) (upper-tail)
One Tailed and Two Tailed test

• A test of any statistical hypothesis,


where the alternative is one sided is
called one tailed/sided test.

• A test of any statistical hypothesis,


where the alternative is two sided is
called two tailed/sided test.
Lower-Tailed Test About a Population Mean

Sampling
distribution
of z  x /- n
0

Reject H0

a 1
Do Not Reject H0

z
-za = -1.28 0
Upper-Tailed Test About a Population Mean:

Sampling
distribution
of z  x -  0
/ n Reject H0

a
Do Not Reject H0

z
0 za = 1.645
Two-Tailed Tests About a Population Mean

Sampling
distribution
x - 0
of z 
/ n

Reject H0 Do Not Reject H0 Reject H0


a/2 = .015 a/2 = .015

z
-2.17 0 2.17
One-Tailed Tests About a Population Mean:
 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:
 Known
 p -Value and Critical Value Approaches

1. Develop the hypotheses. H0:  1


Ha: 1

2. Specify the level of significance. a = .05

3. Compute the value of the test statistic.


x -  13.25 - 12
z   2.47
 / n 3.2 / 40
One-Tailed Tests About a Population Mean:
 Known
 p –Value Approach

4. Compute the p –value.

For z = 2.47, cumulative probability = .9932.


p–value = 1 - .9932 = .0068

5. Determine whether to reject H0.


Because p–value = .0068 < a = .05, we reject H0.
There is sufficient statistical evidence
to infer that Metro EMS is not meeting
the response goal of 12 minutes.
One-Tailed Tests About a Population Mean:
 Known
 p –Value Approach
Sampling
distribution a = .05
x - 0
of z 
/ n

p-value


z
0 za = z=
1.645 2.47
One-Tailed Tests About a Population Mean:
 Known
 Critical Value Approach

4. Determine the critical value and rejection rule.

For a = .05, z.05 = 1.645


Reject H0 if z > 1.645

5. Determine whether to reject H0.


Because 2.47 > 1.645, we reject H0.
There is sufficient statistical evidence
to infer that Metro EMS is not meeting
the response goal of 12 minutes.
p-Value Approach to
Two-Tailed Hypothesis Testing
 Compute the p-value using the following three steps:
1. Compute the value of the test statistic z.
2. If z is in the upper tail (z > 0), compute the
probability that z is greater than or equal to the
value of the test statistic. If z is in the lower tail
(z < 0), compute the probability that z is less than or
equal to the value of the test statistic.
3. Double the tail area obtained in step 2 to obtain
the p –value.
 The rejection rule:
Reject H0 if the p-value < a .
Critical Value Approach to
Two-Tailed Hypothesis Testing
 The critical values will occur in both the lower and
upper tails of the standard normal curve.
 Use the standard normal probability distribution
table to find za/2 (the z-value with an area of a/2 in
the upper tail of the distribution).
 The rejection rule is:
Reject H0 if z < -za/2 or z > za/2.
Two-Tailed Tests About a Population Mean:
 Known
• Example: Glow Toothpaste
The production line for Glow toothpaste is
designed to fill tubes with a mean weight of 6 oz.
Periodically, a sample of 30 tubes will be selected in
order to check the filling process.
Quality assurance procedures call for the
continuation of the filling process if the sample
results are consistent with the assumption that the
mean filling weight for the population of toothpaste
tubes is 6 oz.; otherwise the process will be adjusted.
Two-Tailed Tests About a Population Mean:
 Known
 Example: Glow Toothpaste
Assume that a sample of 30 toothpaste tubes
provides a sample mean of 6.1 oz. The population
standard deviation is believed to be 0.2 oz.
Perform a hypothesis test, at the .03 level of
significance, to help determine whether the filling
process should continue operating or be stopped and
corrected.
Two-Tailed Tests About a Population Mean:
 Known
 p –Value and Critical Value Approaches

1. Determine the hypotheses. H0:  


Ha:   6

2. Specify the level of significance. a = .03

3. Compute the value of the test statistic.


x - 0 6.1 - 6
z   2.74
 / n .2 / 30
Two-Tailed Tests About a Population Mean:
 Known
 p –Value Approach

4. Compute the p –value.

For z = 2.74, cumulative probability = .9969


p–value = 2(1 - .9969) = .0062

5. Determine whether to reject H0.


Because p–value = .0062 < a = .03, we reject H0.
There is sufficient statistical evidence to
infer that the alternative hypothesis is true
(i.e. the mean filling weight is not 6 ounces).
Two-Tailed Tests About a Population Mean:
 Known
 p-Value Approach

1/2 1/2
p -value p -value
= .0031 = .0031

a/2 = a/2 =
.015 .015

z
z = -2.74 0 z = 2.74
-za/2 = -2.17 za/2 = 2.17
Two-Tailed Tests About a Population Mean:
 Known
 Critical Value Approach

4. Determine the critical value and rejection rule.

For a/2 = .03/2 = .015, z.015 = 2.17


Reject H0 if z < -2.17 or z > 2.17

5. Determine whether to reject H0.


Because 2.74 > 2.17, we reject H0.
There is sufficient statistical evidence to
infer that the alternative hypothesis is true
(i.e. the mean filling weight is not 6 ounces).
Two-Tailed Tests About a Population Mean:
 Known
 Critical Value Approach

Sampling
distribution
x - 0
of z 
/ n

Reject H0 Do Not Reject H0 Reject H0


a/2 = .015 a/2 = .015

z
-2.17 0 2.17
Question 1:
A principal at a certain school claims that the students in his
school are above average intelligence. A random sample of
thirty students IQ scores have a mean score of 112. Is there
sufficient evidence to support the principal’s claim? The
mean population IQ is 100 with a standard deviation of 15.

Question 2:
Blood glucose levels for obese patients have a mean of 100
with a standard deviation of 15. A researcher thinks that a
diet high in raw cornstarch will have a positive or negative
effect on blood glucose levels. A sample of 30 patients
who have tried the raw cornstarch diet have a mean
glucose level of 140. Test the hypothesis that the raw
cornstarch had an effect.

S-ar putea să vă placă și