Vous êtes sur la page 1sur 41

Hypothesis testing

Dr Norizan

Meaning:

to infer something about a population parameter


based on a sample statistic

Two

types of statistical inference:

confidence interval: estimates the value of a


population parameter with an interval of
plausible values.
hypothesis test: assesses the evidence provided
by the data against a particular hypothesis about
the population parameter(s)

Dr Norizan

Test

a given theory or belief about a


population parameter
Find out if a claim about a population
parameter is true
Make a decision about a population
parameter based on the value of a sample
statistic

Dr Norizan

Example:

A company claims that the weight of a fruit bar it


produces is 200g
How can we test that this claim is true?
We cannot check all the fruit bars the company
produces
So we take 100 fruit bars at random and find the
mean weight
Then we compare the two values

Dr Norizan

We

need to compare the population


parameter (mean weight = 200g) against the
sample statistic (mean weight of sample)

Dr Norizan

General

procedure:

Choose a specific hypothesis to be tested


:This is called the null hypothesis
example:
H0: = 200

Dr Norizan

In

the event that we reject the null


hypothesis,

We have an alternative hypothesis to establish


Example: Ha: 200
alternatively
Ha: 200 or Ha: 200

The

alternative hypothesis states what we


suspect to be true about the population
parameter

Dr Norizan

We

use a test statistic to do this


The test statistic is t
In this case, we carry out a one sample t test
We must also be sure (95%) that our decision
is correct

Dr Norizan

General

procedure:

Choose a test statistic to evaluate the null


hypothesis (e.g. t statistic)
Choose a random sample, and make
measurements (e.g. mean)
Use the measurements to calculate the t statistic
and determine the likelihood of the hypothesis

Dr Norizan

General

procedure:

Determine the probability of obtaining a test


value as extreme as the observed value
The null hypothesis is rejected if the observed
significance level small enough

Dr Norizan

It

is the probability, if the null hypothesis


were true, that the sample outcome would
be as or more extreme as the one actually
observed
It can be calculated from a sampling
distribution
The smaller the p value, the stronger the
evidence against the null hypothesis

Dr Norizan

significance level is a cut-off for how


small the p value must be in order for the
sample data to be considered decisive
Common values are .05 and .01

Dr Norizan

1.
2.
3.
4.
5.
6.
7.

State the null hypothesis


State the alternative hypothesis
Determine the test statistic
Determine the significance level
Identify sample distribution
Identify critical region
Make decision

Dr Norizan

If the p value is less than ,


then the sample result is said to be
statistically significant at the level

Dr Norizan

One

should not regard pre-specified


significance levels like =.05 as magical cutoff values distinguishing significance from
insignificance
Rather, p values represent a continuum of
varying degrees of the evidences strength
against the null hypothesis

Dr Norizan

How

much time did you spend to study


PLG500 in a week?
Write the null hypothesis
Record the number of hours per week you
take to study for PLG500
Enter your data into an SPSS file
Conduct a one sample t test (what is the
actual mean?)

Dr Norizan

Student

Hours studying PLG500

Dr Norizan

Dr Norizan

Dr Norizan

n = 36
mean = 3.77
p =.000
.025

.025

.025

p = .000 is smaller than p = .05


Therefore we reject H0

Dr Norizan

n = 36
mean = 3.77
p =.009

.025

.025

p = .009 is smaller than p = .05


Therefore we reject H0

Dr Norizan

n = 36
mean = 3.77
p =.404

.025

3.5

.025

p = .404 is larger than p = .05


Therefore we fail to reject H0

Dr Norizan

Conclusions

made do not have 100% certainty


Conclusions made are associated with
particular levels of significance
This tells us how confident we are that the
conclusions made are very close to the real
situation

Dr Norizan

One

must consider the practical significance


of the result
Example: a new teaching method improves
performance of a group of students by 5
marks
p value for the t test = 0.03
Statistically, this is significant
However, does an increase of 5 marks mean
anything?

Dr Norizan

Sample

size plays an important role in tests


of significance.

A large sample can detect even a very small


difference or effect
A small sample may fail to detect even a large
difference or effect

Dr Norizan

Assumptions

is important to define the


sampling distribution of a test statistic
Correct significance levels can only be
calculated when the distribution is defined
Tests of assumptions should be incorporated
as part of the hypothesis testing procedure

Dr Norizan

Dr Norizan

Dr Norizan

To

determine whether the mean IQ of


adopted children differs from the mean for
the general population of children (known to
be 100)

Hypothesis, Ho : =100
Set =.05 (the commonly chosen value)
Data collected from a random sample of
n=25 adopted children, mean = 108,
=15
If the probability (p) is less than .05 () Ho
will be rejected at the .05 level of
significance.
If p>.05, Ho is not rejected
Null

The area under the normal curve = 100%


100% = 100% 100 =1

For = .05, we want to have 95%


confidence that our decision is correct
this represents 95% of the area under the
normal curve
95% = 95% 100 = .95
1 = .95
Dr Norizan

= .05
The area shaded
red is .05

Dr Norizan

p = .02
The area
shaded red
is .02

= .05

p = .02

Dr Norizan

If the p value is less than ,


The sample is statistically significant
at significance level

Dr Norizan

Example: p = .02, = .05


The sample mean is statistically significant
at significance level of .05

p = .02

= .05

Dr Norizan

1.
2.
3.
4.
5.
6.
7.

Analyze
Compare means
One sample t test
Move selected variable to the test
variable box
Select test value (= population mean)
Options 95% confidence interval continue
OK
Dr Norizan

One-Sample Statistics
N
Exam Perf ormance (%)

103

Dr Norizan

Mean
56.57

Std. Dev iation


25.941

Std. Error
Mean
2.556

One-Sample Statistics
N
Exam Perf ormance (%)

103

Mean
56.57

Std. Dev iation


25.941

Std. Error
Mean
2.556

One-Sample Test
Test Value = 60

Exam Perf ormance (%)

t
-1.341

df
102

Dr Norizan

Sig. (2-tailed)
.183

Mean
Diff erence
-3.427

95% Confidence
Interv al of the
Diff erence
Lower
Upper
-8.50
1.64

Make decision
t = - 1.34, d.f. = 102, p = .183
p > .05,
Therefore we fail to reject the null
hypothesis
Thus the sample mean is not significantly
different from the population mean
Dr Norizan

One-Sample Statistics
N
Exam Perf ormance (%)

103

Mean
56.57

Std. Dev iation


25.941

Std. Error
Mean
2.556

One-Sample Test
Test Value = 78

Exam Perf ormance (%)

t
-8.383

df
102

Dr Norizan

Sig. (2-tailed)
.000

Mean
Diff erence
-21.427

95% Confidence
Interv al of the
Diff erence
Lower
Upper
-26.50
-16.36

Make decision
t = - 8.38, d.f. = 102, p = .00
p < .05,
Therefore we reject the null hypothesis

Thus the sample mean is significantly


different from the population mean
Dr Norizan

Vous aimerez peut-être aussi