0% found this document useful (0 votes)
5 views18 pages

Hypothesis Testing Examples

The document provides a comprehensive overview of hypothesis testing in statistics, detailing the formulation of null (H0) and alternative (H1) hypotheses, guidelines for their determination, and the steps involved in hypothesis testing. It includes examples of various statistical tests for means, variances, and proportions, along with specific scenarios to illustrate the application of these tests. Additionally, it outlines the significance levels and test statistics used in different situations.

Uploaded by

antarahclinton
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

Hypothesis Testing Examples

The document provides a comprehensive overview of hypothesis testing in statistics, detailing the formulation of null (H0) and alternative (H1) hypotheses, guidelines for their determination, and the steps involved in hypothesis testing. It includes examples of various statistical tests for means, variances, and proportions, along with specific scenarios to illustrate the application of these tests. Additionally, it outlines the significance levels and test statistics used in different situations.

Uploaded by

antarahclinton
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Hypothesis Testing
ST 222 – Statistical Analysis

Dr. Ihab El-Khodary

Formulating the Hypothesis


• It is important when formulating H0 to designate
it in such a way that the type I error (rejecting
H0 when it is true) is the most important one to
avoid.
• Therefore, it is recommended that the actual
hypothesis to be tested is to be H1, while H0 is
to be the opposite.
• Also, H0 should include an equal sign for the
pop parameter being tested.
Dr. Ihab El-Khodary 2

Dr. Marwa Sabry & Dr. Ihab El-Khodary 1


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Guidelines for determining which


should be H0 & which should be H1

1. Read the problem carefully and determine the


claim to be tested.

2. If the claim suggests a simple direction such


as more than, less than, superior to, inferior to,
etc … then H1 will be stated using the
inequality symbol (< or >) corresponding to the
suggested direction.

Dr. Ihab El-Khodary 3

3. If the claim suggests a compound direction


(equality as well as direction) such as at least,
equal to or greater than, at most, or more than
or equal, etc …then the entire compound
direction (≤ or ≥) is expressed as H0, but using
only the equality sign, and H1 is given the
opposite direction.

4. If no direction whatsoever is suggested by the


claim then H1 is stated using the not equal
symbol (≠).

Dr. Ihab El-Khodary 4

Dr. Marwa Sabry & Dr. Ihab El-Khodary 2


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Summary of Procedure for


Hypothesis Testing

• Assume that H0: θ = θ0.


1. State the null hypothesis H0 that θ = θ0.

2. Choose an appropriate alternative


hypothesis H1 from one of the following
options: θ < θ0, θ > θ0, or θ ≠ θ0.

3. Choose a significance level of size α.

Dr. Ihab El-Khodary 5

4. Select the appropriate test statistic and


establish the critical region.

5. Compute the value of the test statistic


from the sample data.

6. Decision:

Reject H0 if the test statistic has a value in


the critical region; otherwise, do not reject
H0.

Dr. Ihab El-Khodary 6

Dr. Marwa Sabry & Dr. Ihab El-Khodary 3


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Selecting Appropriate Test


Statistics
1. A Single Sample Mean (σ known)
z = X - µ0
σ / √n
2. A Single Sample Mean (σ unknown)
t = X - µ0
s / √n
3. Two Sample Means (σ’s known)
H0: µ1 - µ2 = d0
z = (X1 – X2) – (µ1 - µ2)
√ (σ12 / n1 + σ22 / n2)
Dr. Ihab El-Khodary 7

4. Two Sample Means (σ’s unknown but equal)


H0: µ1 - µ2 = d0
t = (X1 – X2) – d0
sp √(1 / n1 + 1 / n2)

where: sp2 = s12 (n1 – 1) + s22 (n2 – 1)


n1 + n 2 – 2
df = n1 + n2 – 2

5. Two Sample Means (σ’s unknown & unequal)


H0: µ1 - µ2 = d0
t = (X1 – X2) – d0
√(s12 / n1 + s22 / n2)

where: df = (s12 / n1 + s22 / n2)2


[(s12/n1)2 / (n1 – 1)] + [(s22/n2)2 / (n2 – 1)]
Dr. Ihab El-Khodary 8

Dr. Marwa Sabry & Dr. Ihab El-Khodary 4


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

6. Paired Samples
H0: µd = d0 (usually d0 = 0)

t= d – d0
sd / √n

where: df = n – 1

Dr. Ihab El-Khodary 9

7. A Single Sample Variance (df ≤ 30)


H0: σ2 = σ02
c2 = (n – 1) s2
σ02
8. A Single Sample Variance (df > 30)
H0: σ2 = σ02
z = c2 – (n – 1)
√ 2 (n – 1)
9. Two Sample Variances (Ratio)
H0: σ12 / σ22 = r0
F = s12
r0 s22
Dr. Ihab El-Khodary 10

Dr. Marwa Sabry & Dr. Ihab El-Khodary 5


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

10. A Single Sample Proportion


H0: π = π0
z= p – π0
√ π0 (1 - π0) / n

11. Two Sample Proportions


H0: 1 - 2 = d0
z = (p1 – p2) – d0
√ pq (1 / n1 + 1 / n2)

where: p = x1 + x2 = n1 p1 + n2 p2 and q = 1 – p
n1 + n2 n1 + n2
Dr. Ihab El-Khodary 11

Example 1
Because couples are deciding to have fewer
children, the family size in the US has declined
continuously during the past few decades.
According to the US Bureau of the Census, the
mean family size was 3.17 in 2001. An economist
wanted to check if the current family size is less
than 3.17. A sample of 900 families taken this year
by this economist produced a mean family size of
3.13 with a standard deviation of 0.7. Using a
0.025 (2.5%) significance level, can we conclude
that the mean family size has declined since
2001?
Dr. Ihab El-Khodary 12

Dr. Marwa Sabry & Dr. Ihab El-Khodary 6


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 2
When working properly, a machine that is used to
make chips for computers does not produce more
than 4% defective chips. Whenever the machine
produces more than 4% defective chips, it needs
an adjustment. To check if the machine is working
properly, the quality control department at the
company often takes samples of chips and
inspects them to determine if they are good or
defective. One such random sample of 200 chips
taken recently from the production line contained
14 defective chips. Test at the 5% significance level
whether or not the machine needs an adjustment.
Dr. Ihab El-Khodary 13

H0:  = 0.04 (machine does not need


adjustment)
H1:  > 0.04 (machine needs adjustment)

n = 200 Xdefective = 14 p = 14/200


 = 5% zcr = z0.05 right = z0.95 left = 1.645

z = p – π0
√ π0 (1 - π0) / n

Dr. Ihab El-Khodary - 14

Dr. Marwa Sabry & Dr. Ihab El-Khodary 7


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 3
It is known that the variance of monthly earnings
of all state employees for all 50 states in the US is
490,000 square dollars. A sample of 29 state
employees selected from New Jersey produced a
variance of their monthly earnings equal to
600,000 $2. Test at the 5% significance level if the
variance of monthly earnings of state employees
in New Jersey is different from 490,000 $2.
Assume that the monthly earnings of all state
employees in New Jersey have an (approximate)
normal distribution.
Dr. Ihab El-Khodary 15

H0: 2 = 490,000 $2

H1: 2 ≠ 490,000 $2

n = 29 s2 = 600,000 $2
 = 5% c2cr = c20.975,28 = 15.308
c2cr = c20.025,28 = 44.461

c2 = (n – 1) s2
σ02
Dr. Ihab El-Khodary - 16

Dr. Marwa Sabry & Dr. Ihab El-Khodary 8


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 4
A sample of 14 cans of Brand 1 diet soda gave the
mean number of calories of 23 per can with a
standard deviation of 3 calories. Another sample
of 16 cans of Brand 2 diet soda gave the mean no.
of calories of 25 per can with a standard deviation
of 4 calories. At the 1% significance level, are the
mean no. of calories per can different for these
two brands of diet soda? Assume that the
calories per can of diet soda are normally
distributed for each of the two brands and that
the st. deviations for each of the two populations
are equal.
Dr. Ihab El-Khodary 17

H0: µ1 = µ2 (mean calories not different


H0: µ1 - µ2 = 0 i.e. equal)
H1: µ1 - µ2 ≠ 0 (mean calories different)

n1 = 14 X1 = 23 cal s1 = 3 cal
n2 = 16 X2 = 25 cal s2 = 4 cal
 = 1% t0.005,28 = 2.763 -t0.005,28 = -2.763

t= (X1 – X2) – d0
sp √(1 / n1 + 1 / n2)
Dr. Ihab El-Khodary - 18

Dr. Marwa Sabry & Dr. Ihab El-Khodary 9


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 5
A business consultant agency wanted to estimate
the difference between the percentages of users
of two toothpastes who will never switch to
another toothpaste. In a sample of 500 users of
Toothpaste A, 20% said that they will never
switch to another toothpaste. In another sample
of 400 users of Toothpaste B, 13% said that they
will never switch to another toothpaste. At the 1%
significance level, can we conclude that the
proportions of users of Toothpaste A who will
never switch to another toothpaste is greater than
the proportion of users of Toothpaste B who will
never switch to another toothpaste?
Dr. Ihab El-Khodary 19

H0: A - B ≤ 0
H1: A > B (proportion of A greater than B)
H1: A - B > 0

nA = 500 pA = 0.20
nB = 400 pB = 0.13 Z0.01 = 2.763
 = 1% Z0.01 right = Z0.99 left = 2.33

z= (p1 – p2) – d0
√ pq (1 / n1 + 1 / n2)
Dr. Ihab El-Khodary - 20

Dr. Marwa Sabry & Dr. Ihab El-Khodary 10


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 6

Grand Auto Cooperation produces auto batteries.


The company claims that its top of the line Never
Die batteries are good, on average, for at least 65
months. A consumer protection agency tested 15
such batteries to check this claim. It found the
mean life of these 15 batteries to be 63 months
with a standard deviation of 2 months. At the 5%
significance level, can you conclude that the
claim of the company is true? Assume that the
life of such a battery has an approximate normal
distribution.
Dr. Ihab El-Khodary 21

H0: µ ≥ 65 (avg. life at least 65 months -


batteries are good)
H1: µ < 65 (avg. life less than 65 months)

n = 15 X = 63 months s = 2 months
 = 5% -t0.05,14 = -1.761

t = X - µ0
s / √n

Dr. Ihab El-Khodary - 22

Dr. Marwa Sabry & Dr. Ihab El-Khodary 11


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 7
Ann Howard conducted a management progress
study with AT&T management job holders to assess
the performance of those who possessed a college
degree and those who did not. Let us refer to the two
groups of participants as college and noncollege
participants, respectively. The samples included 274
college and 148 noncollege participants. In the area
of motivation advancement, the mean scores were
2.89 for college participants and 2.70 for noncollege
participants, with the two standard deviations being
0.57 and 0.64, respectively. Test at the 5%
significance level if the mean score in the area of
motivation for advancement is higher for college
degree holders than for noncollege participants.
Dr. Ihab El-Khodary 23

H0: µC - µN ≤ 0
H1: µC > µN (mean score is higher for
H1: µC - µN > 0 college degree holders)

nC = 274 XC = 2.89 sC = 0.57


nN = 148 XN = 2.70 sN = 0.64
 = 5% Z0.05 right = Z0.95 left = 1.645

z = (XC – XN) – (µC - µN)


√ (sC2 / nC + sN2 / nN)
Dr. Ihab El-Khodary - 24

Dr. Marwa Sabry & Dr. Ihab El-Khodary 12


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 8

The management of Priority Health Club claims


that its members lose an average of 10 pounds or
more within the first month after joining the club.
A consumer agency that wanted to check this
claim took a random sample of 36 members of
this health club and found that they lost an
average of 9.2 pounds within the first month of
membership with a standard deviation of 2.4
pounds. Test the hypothesis at significance level
of 5%.

Dr. Ihab El-Khodary 25

H0: µ ≥ 10 lbs (avg. loss of 10 lbs or more)

H1: µ < 10 lbs (avg. loss less than 10 lbs)

n = 36 X = 9.2 lbs s = 2.4 lbs


 = 5% z0.05 left = -1.645

z = X - µ0
s / √n

Dr. Ihab El-Khodary - 26

Dr. Marwa Sabry & Dr. Ihab El-Khodary 13


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Example 9

Armstrong Windows makes windows for use in


home and commercial buildings. The standards
for glass thickness call for the glass to average
0.375 with a standard deviation of 0.500 inch. A
random sample of 100 windows from Armstrong
yields a mean of 0.392 inches. Test, at 5% level of
significance, the hypothesis that the average
glass thickness is more than the standard,
assuming that the standard deviation is 0.1 inch.

Dr. Ihab El-Khodary 27

H0: µ ≤ 0.375 in
H1: µ > 0.375 in (avg. thickness in more than
standards)

n = 100 X = 0.392 in  = 0.500 in


 = 5% z0.05 right = 1.645

z = X - µ0
 / √n

Dr. Ihab El-Khodary - 28

Dr. Marwa Sabry & Dr. Ihab El-Khodary 14


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Problem 10
According to the U.S. Bureau of Labor Statistics,
the average weekly earnings of a production
worker in 1997 were $424.20. Suppose a labor
researcher wants to test to determine whether
this figure is still accurate today. The researcher
randomly selects 54 production workers from
across the United States and obtains a
representative earnings statement for one week
from each. The resulting sample average is
$432.69. Assuming a population standard
deviation of $33.90, and a 5% level of
significance, determine whether the mean weekly
earnings of a production worker have changed.
Dr. Ihab El-Khodary 29

H0: µ = $424.20 (weekly earnings did not


change)
H1: µ ≠ $424.20 (weekly earnings has changed)

n = 54 X = $432.69  = $33.90
 = 5%

z = X - µ0
σ / √n

Dr. Ihab El-Khodary - 30

Dr. Marwa Sabry & Dr. Ihab El-Khodary 15


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Problem 11
According to [Link], the average price
charged to a customer to have a 12’ by 18’ wall-to-wall
carpet shampoo cleaned is about $50. Suppose that a
start-up carpet-cleaning company believes that in the
region in which they operate, the average price for this
service is higher. To test this hypothesis, the carpet-
cleaning company randomly contacts 23 customers who
have recently had a 12’ by 18’ wall-to-wall carpet shampoo
cleaned and asked the customers how much they were
charged for the job. Suppose the resulting data are given
below and that the population standard deviation price is
$3.49. Use a 10% level of significance to test their
hypothesis. Assume that such prices are normally
distributed in the population. What is the observed value?
What is the p-value? What is the decision? If the null
hypothesis is rejected, is the result substantive?
Dr. Ihab El-Khodary 31

H0: µ = $50 (average price not higher)


H1: µ > $50 (average price is higher)

n = 23 X = $52.17 s = $2.66
 = 10%

t = X - µ0
s / √n

Dr. Ihab El-Khodary - 32

Dr. Marwa Sabry & Dr. Ihab El-Khodary 16


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Problem 12
According to data released by the World Bank, the mean
PM10 (particulate matter) concentration for the city of
Kabul, Afghanistan, in 1999 was 46. Suppose that because
of efforts to improve air quality in Kabul, increases in
modernization, and efforts to establish environmental-
friendly businesses, city leaders believe rates of
particulate matter in Kabul have decreased. To test this
notion, they randomly sample 12 readings over a one-year
period with the resulting readings shown below. Do these
data present enough evidence to determine that PM10
readings are significantly less now in Kabul? Assume that
particulate readings are normally distributed and that  =
0.01.

Dr. Ihab El-Khodary 33

H0: µ = 46 (rates of MP10 did not change)


H1: µ < 46 (rates of particulate matter decreased)

n = 12 X = 42.17 s = 9.12
 = 1%

t = X - µ0
s / √n

Dr. Ihab El-Khodary - 34

Dr. Marwa Sabry & Dr. Ihab El-Khodary 17


ST222 – Probability & Statistics 2 Hypothesis Testing Examples

Dr. Ihab El-Khodary - 35

Wish You
All The
Best

Good Luck

Dr. Ihab El-Khodary - 36

Dr. Marwa Sabry & Dr. Ihab El-Khodary 18

You might also like