Hypothesis Testing (Lecture) PDF
Hypothesis Testing (Lecture) PDF
HYPOTHESIS
- intellectual guess
Type I Error
– null hypothesis is rejected when it is true
Type II Error
– null hypothesis is accepted when it is
false
Example:
The defendant is either guilty or innocent,
and he or she will be convicted or
acquitted.
Reject Ho
Type I Correct
(convict) Error decision
Do not
Correct Type II
Reject Ho decision Error
(acquit)
The decision to reject or not reject the
null hypothesis does not prove anything.
df n n 2
1 2
Statistical Test
t-test (dependent samples)
ഥ 𝑛
𝐷
𝑡=
𝑛 σ 𝐷2 − σ 𝐷 2
𝑛(𝑛 − 1)
df = n – 1
where:
D = difference between the scores
𝐷ഥ = mean of the difference
n = number of pairs of the given
Statistical Test
t-test with correlation
𝑟 𝑛−2
𝑡=
1 − 𝑟2
df = n – 2
where:
r = pearson r
n = number of pairs of the given
Statistical Test
Chi-Square Test
- it is particularly useful in tests involving
cases where persons, events or objects
are grouped in two or more nominal
categories such as yes or no, approve-
undecided-disapprove, or class A,B,C,D.
2
x
O E 2
E
Steps for Testing Hypothesis
1. State the null hypothesis
2. Select an appropriate alternative
hypothesis
3. Choose the appropriate statistical test
4. Select the desired level of significance to
be used
5. Compute the calculated value and
determine the critical test value
6. Make the decision. Reject the null
hypothesis if the calculated value is
larger than the critical value, otherwise,
do not reject the null.
Example:
A company that makes chocolates claims that
the mean weight of the bag of chocolates is
240 grams with the standard deviation of
20.5 grams. Using a 0.05 significance level,
would you agree with the company if a
random sample of 50 bags of chocolates was
found to have a mean weight of 230 grams?
Example:
A random sample of 25 cartons of a
certain brand of powdered milk showed
a mean content of 237 grams with a
standard deviation of 8.56 grams, while a
sample of 20 cartons of another brand of
powdered milk showed a mean content
of 240 grams with a standard deviation
of 9.75 grams. Using a 0.05 level of
significance, is there a difference in the
mean content of the two brands of
powdered milk?
Example:
Hoaglin, Mosteller and Turkey (1983)
present data on blood levels of beta-
endorphin as a function of stress. They
measured beta-endorphin levels on 12
patients 12 hours before surgery and again
10 minutes before surgery. The data are
presented here, in fmol/ml.
What is the significant difference in the
blood levels of beta-endorphin as a function
of stress in 12 hours before and 10 minutes
before surgery?
(Data is presented on the next slide.)
Example:
. Subject 12 hours before 10 minutes
before
1 10.0 6.5
2 6.5 14.0
3 8.0 13.5
4 12.0 18.0
5 5.0 14.5
6 11.5 9.0
7 5.0 18.0
8 8.5 12.0
9 7.5 7.5
10 5.8 6.0
11 4.7 25.0
12 8.0 12.0
Example:
Suppose you were interested in the effects
of interracial contact on racial attitudes.
You have a fairly reliable test of racial
attitudes in which high scores indicate
more positive attitudes. You administer
the test one Monday morning to a biracial
group of fourteen 12-year old girls who do
not know each other but who have signed
up for a weeklong community day camp.
Example:
The campers then spend the next week
taking nature walks, playing ball, eating
lunch, swimming, making things, and doing
the kinds of things that camp directors
dream up to keep 12-year-old busy. On
Saturday morning, the girls are again given
the racial attitude test. Thus, the data
consists of 14 pairs of before-and-after
scores. What conclusion can you make
after testing the degree of significance
difference of the hypothesis?
Exercises:
1. A random sample of 8 cigarettes of a
certain brand has an average nicotine
content of 4.2 milligrams and a
standard deviation of 1.4 milligrams. Is
this in line with the manufacturer’s
claim that the average nicotine content
does not exceed 3.5 milligrams? Use a
0.05 level of significance and assume
the distribution of nicotine to be
normal.
Exercises:
2. A random sample of 100 recorded
deaths in the Philippines during the
past year showed an average life span
of 71.8 years, with a standard deviation
of 8.9 years. Does this seem to indicate
that the average lifespan today is
greater than 70 years? Use alpha =
0.10.
Exercises:
3. A manufacturer claims that the average
tensile strength of thread A exceeds the
average tensile strength of thread B by at
least 12 kilograms. To test this claim, 50
pieces of each type of thread are tested
under similar conditions. Type A thread
had an average tensile strength of 86.7
kilograms with a standard deviation of
6.28 kilograms, while type B thread had an
average strength of 77.8 kilograms with a
standard deviation of 5.61 kilograms. Test
the manufacturer’s claim using a 0.01 level
of significance.
Exercises:
Breastfeeding Timelines
Autism None Less than 2 2 to 6 More than
months months 6 months
Yes 241 198 164 215
No 20 25 27 44
EXERCISES:
1. The National Center for Health Statistics (NCHS) provided
data on the distribution of weight (in categories) among
Americans in 2002. The distribution was based on
specific values of body mass index (BMI) computed as
weight in kilograms over height in meters squared.
Underweight was defined as BMI< 18.5, Normal weight as
BMI between 18.5 and 24.9, overweight as BMI between
25 and 29.9 and obese as BMI of 30 or greater. Americans
in 2002 were distributed as follows: 2% Underweight,
39% Normal Weight, 36% Overweight, and 23% Obese.
Suppose we want to assess whether the distribution of
BMI is different in the Framingham Offspring sample.
EXERCISES:
Age Score
High Average Low
40 – 49 23 20 17
20 – 39 18 12 10