Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
81 views

Hypothesis Testing

1. Hypothesis testing is a statistical method used to evaluate claims about populations based on sample data. It involves stating a null hypothesis and an alternative hypothesis. 2. There are traditional, p-value, and confidence interval methods for testing hypotheses. The traditional method involves stating hypotheses, designing a study, selecting a statistical test, and making a decision to reject or fail to reject the null hypothesis. 3. Examples are provided to demonstrate hypothesis testing for means and differences between means using z-tests, t-tests, and confidence intervals. The examples test claims in various contexts like manufacturing, education, and healthcare.

Uploaded by

Muhammad Areeb
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Hypothesis Testing

1. Hypothesis testing is a statistical method used to evaluate claims about populations based on sample data. It involves stating a null hypothesis and an alternative hypothesis. 2. There are traditional, p-value, and confidence interval methods for testing hypotheses. The traditional method involves stating hypotheses, designing a study, selecting a statistical test, and making a decision to reject or fail to reject the null hypothesis. 3. Examples are provided to demonstrate hypothesis testing for means and differences between means using z-tests, t-tests, and confidence intervals. The examples test claims in various contexts like manufacturing, education, and healthcare.

Uploaded by

Muhammad Areeb
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Hypothesis Testing

Osama Bin Ajaz


Lecturer, S & H Dept.,
FAST-NU, Main Campus, Karachi
osama.ajaz@nu.edu.pk
Introduction
• Researchers are interested in answering many types of questions. For example:
• Scientist might want to know whether the earth is warming up.
• A physician might want to know whether a new medication will lower a person’s
blood pressure.
• An educator might wish to see whether a new teaching technique is better than a
traditional one.
• A retail merchant might want to know whether the public prefers a certain color
in a new line of fashion.
• Automobile manufacturers are interested in determining whether seat belts will
reduce the severity of injuries caused by accidents.
• These types of questions can be addressed through statistical hypothesis testing,
which is a decision-making process for evaluating claims about a population.
Three Methods to test statistical Hypothesis

1. The traditional method


2. The P-value method
3. The confidence interval method
Steps in Hypothesis Testing—Traditional Method

• There are two types of statistical hypotheses for each situation: the
null hypothesis and the alternative hypothesis.
Hypothesis Testing (Contd.)
• To state hypotheses correctly, researcher must translate the
conjecture or claim from words into mathematical symbols. The basic
symbols used are as follows:

• The null and alternative hypotheses are stated together, and the null
hypothesis contains the equals sign, as shown (where k represents a
specified number).
State the null and alternative hypotheses
for each conjecture
• An engineer hypothesizes that the mean number of defects can be
decreased in a manufacturing process of compact disks by using robots
instead of humans for certain tasks. The mean number of defective disks
per 1000 is 18.
• A psychologist feels that playing soft music during a test will change the
results of the test. The psychologist is not sure whether the grades will be
higher or lower. In the past, the mean of the scores was 73.
• A real estate agent claims that 60% of all private residences being built
today are 3bedroom homes. To test the claim, a large sample of new
residences are inspected; the proportion of these homes with 3 bedrooms
is recorded and used as out test statistic state the null & alternative
hypotheses.
Hypothesis Testing (Contd.)
• After stating the hypothesis, the researcher designs the study. The
researcher selects the correct statistical test, chooses an appropriate
level of significance, and formulates a plan for conducting the study.
4 types of decisions
• In the hypothesis-testing situation, there are four possible outcomes.
P(Type-I) = Level of significance Ho True Ho False

Error Correct
Reject Ho
(Type – I) Decision

Correct Error P(Type-II) = β


Do not reject Ho
Decision (Type – II)
Hypothesis Testing (Contd.)
Hypothesis-testing situation in a Jury Trial
• In a jury trial, there are four possible outcomes. The defendant is
either guilty or innocent, and he or she will be convicted or acquitted.

• Next, the evidence is presented in court by the prosecutor, and based


on this evidence, the jury decides the verdict, innocent or guilty.
Jury trial (Results of trial)
Steps in Hypothesis Testing (summary)
Z-test for mean
• The z test is a statistical test for the mean of a population. It can be
used when n > 30, or when the population is normally distributed and
σ is known. The formula for the z test is
Example # 01 – 02
• An electrical 0.10
Level of firm manufactures light 0.05
bulbs that have 0.01 a length of life
that isSignificance
approximately normally distributed with a mean of 1600 hours
H1: µ > µo or µ < +1.28, - 1.28 +1.64, -1.64 +2.33, -2.33
and a standard µo deviation of 80 hours. Test the hypothesis that µ =
1600 hoursH1: µagainst
≠ µo alternative
+1.64, -1.64 µ ≠ +1.96,
1600-1.96
hours if+2.58,
a random
- 2.58 sample of
30 bulbs has an average life 1576 hours. Use a 0.01 level of
significance.
• A sample of 16 observations is taken from a normal population whose
standard deviation σ = 30. The mean is computed as 110. Test the
hypothesis that µ = 100 against the alternative µ > 100 at 0.05 level of
significance.
Level of 0.10 0.05 0.01
Example # 03 Significance
H1: µ > µo or µ < +1.28, - 1.28 +1.64, -1.64 +2.33, -2.33
µo
H1: µ ≠ µo +1.64, -1.64 +1.96, -1.96 +2.58, - 2.58
• A researcher claims that the average cost of men’s athletic shoes is
less than $80. He selects a random sample of 36 pairs of shoes from a
catalog and finds the following costs (in dollars). (The costs have been
rounded to the nearest dollar.) Is there enough evidence to support
the researcher’s claim at a 0.10? Assume σ =19.2.
Example # 04
Example # 05
Confidence Interval on µ when σ is known
Test of Difference between two means
Test of Difference between two means
(Contd.)
Example # 06
• Hotel Room Cost: A survey found that the average hotel room rate in
New Orleans is $88.42 and the average room rate in Phoenix is
$80.61. Assume that the data were obtained from two samples of 50
hotels each and that the standard deviations of the populations are
$5.62 and $4.83, respectively. At α = 0.05, can it be concluded that
there is a significant difference in the rates?
• Find the 95% confidence interval for the difference between the
means.
Example # 07
• A researcher hypothesizes that the average number of sports that colleges
offer for males is greater than the average number of sports that colleges
offer for females. A sample of the number of sports offered by colleges is
shown. At α = 0.10, is there enough evidence to support the claim?
Assume σ1 and σ2 = 3.3.

Example # 05 – 06
• A random of sample of size n1 = 50 taken from normal population with
a standard deviation σ1 = 7.35 has sample mean 181. A second sample
of size n2 = 72 taken from a different normal population with σ2 = 4.81
has sample mean 176. Test the hypothesis at 0.05 level of significance
that µ1 = µ2, vs. µ1 ≠ µ2.
• A farmer claims that the average yield of wheat of variety A exceeds the
average yield of variety B by at least 12 bushels per acre. To test this
claim, 50 acres of each variety are planted and grown under similar
conditions. Variety A yielded on the average, 86.7 bushels per acre with
a standard deviation of 6.28 bushels per acre, while variety B yielded,
on the average 77.8 bushels per acre with a standard deviation of 5.61
bushels per acre. Test the farmer’s claim at alpha = 0.01.
Example # 07
• 
t-test for a Mean
(t-distribution)
• The t distribution is similar to the standard normal distribution in
the following ways.
• It is bell-shaped.
• It is symmetric about the mean.
• The mean, median, and mode are equal to 0 and are located at the
center of the distribution.
• The curve never touches the x axis.
t-test for a Mean
(t-distribution)

• The variance is greater than 1.


• The t distribution is a family of curves based on the degrees of
freedom, which is a number related to sample size.
• As the sample size increases, the t distribution approaches the normal
distribution.
t-test for a Mean

• The t-test is defined as:


Example # 08 & 09
• Hospital Infections: A medical investigation claims that the average
number of infections per week at a hospital in southwestern
Pennsylvania is 16.3. A random sample of 10 weeks had a mean
number of 17.7 infections. The sample standard deviation is 1.8. Is
there enough evidence to reject the investigator’s claim at a 0.05?
• Substitute Teachers’ Salaries: An educator claims that the average
salary of substitute teachers in school districts in Allegheny County,
Pennsylvania, is less than $60 per day. A random sample of eight
school districts is selected, and the daily salaries (in dollars) are
shown. Is there enough evidence to support the educator’s claim at α
0.10?
Example # 10
• Jogger’s Oxygen Uptake: A physician claims that joggers’ maximal
volume oxygen uptake is greater than the average of all adults. A
sample of 15 joggers has a mean of 40.6 milliliters per kilogram
(ml/kg) and a standard deviation of 6 ml/kg. If the average of all
adults is 36.7 ml/kg, is there enough evidence to support the
physician’s claim at α = 0.05?
Testing Difference between two mean when σ1≠ σ2
(Independent Sample: t-test)
Example # 11
• Farm Sizes: The average size of a farm in Indiana County,
Pennsylvania, is 191 acres. The average size of a farm in Greene
County, Pennsylvania, is 199 acres. Assume the data were obtained
from two samples with standard deviations of 38 and 12 acres,
respectively, and sample sizes of 8 and 10, respectively. Can it be
concluded at α = 0.05 that the average size of the farms in the two
counties is different? Assume the populations are normally
distributed.
• Find the 95% confidence interval .
Example # 12
• Too Long on the Telephone: A company collects data on the lengths
of telephone calls made by employees in two different divisions. The
mean and standard deviation for the sales division are 10.26 and 8.56,
respectively. The mean and standard deviation for the shipping and
receiving division are 6.93 and 4.93, respectively. A hypothesis test
was run, and the computer output follows.
Example # 12 (Contd.)
Independent

We compare the p-value

P-value = P(Type – I)

Two-tailed, since two critical values are given


we fail to reject the null hypothesis & conclude that there is a
difference in the lengths of telephone calls.

If the significance level had been 0.10, we would


have rejected the null hypothesis,
Example # 13

• Test the claim that there is no difference between population means


based on these sample data.
Testing Difference between two mean when σ1= σ2
(Independent Sample: t-test)
• When the variances are assumed to be equal, this formula is used:
Example # 14
• Test Ho: µ1 - µ2 ≤ 3 against H1: µ1 - µ2 > 3 . Let α = 0.10 , σ1= σ2 but
unknown & normally distributed populations.
• Sample I: 51, 42, 49, 55, 46, 63, 56, 58, 47, 39, 47.
• Sample II: 38, 49, 45, 29, 31, 35.
Testing the Difference Between Two Means:
Dependent Samples
• Samples are considered to be dependent samples when the subjects are paired,
matched or related in some way.
• Here are some other examples of dependent samples:
• A researcher may want to design an SAT preparation course to help students raise
their test scores the second time they take the SAT. Hence, the differences
between the two exams are compared.
• A medical specialist may want to see whether a new counseling program will help
subjects lose weight. Therefore, the preweights of the subjects will be compared
with the postweights.
Testing the Difference Between Two Means:
Dependent Samples (Contd.)
• When the samples are dependent, a special t test for dependent
means is used. This test employs the difference in values of the
matched pairs. The hypotheses are as follows:
Example # 15
• Bank Deposits: A sample of nine local banks shows their deposits (in
billions of dollars) 3 years ago and their deposits (in billions of dollars)
today. At a 0.05, can it be concluded that the average in deposits for
the banks is greater today than it was 3 years ago? Use a 0.05.
Example # 15 (contd.)

9.73 40.5437
Example # 16
• Cholesterol Levels: A dietitian wishes to see if a person’s cholesterol
level will change if the diet is supplemented by a certain mineral. Six
subjects were pretested, and then they took the mineral supplement
for a 6-week period. The results are shown in the table. (Cholesterol
level is measured in milligrams per deciliter.) Can it be concluded that
the cholesterol level has been changed at a 0.10? Assume the variable
is approximately normally distributed.
I have calculated mean and variance for their differences above in
excel.
t-critical = 2.571
t-statistics = 0.0126
we are unable to reject Ho because t-statistics is less than t-critical.
the supplement has no effect in changing cholesterol level.
How to select correct test for testing mean
• Students sometimes have difficulty deciding whether to use the z test
or t test.

You might also like