Вы находитесь на странице: 1из 24

ONE-SAMPLE HYPOTHESIS

TESTING
Introducing hypothesis tests
Testing hypotheses about means
Testing hypotheses about variances

2
Hypotheses, Tests, and Errors ?

Hypothesis

- It’s a tentative explanation of some process, whether


that process is natural or artificial.
Two types of Hypothesis

Null hypothesis (abbreviated Ho)- this hypothesis holds that


if the data deviate from the norm in any way, that deviation is
due strictly to chance.

Alternative hypothesis (abbreviated H1), explains things


differently. According to the alternative hypothesis, the data
show something important. 3
Decisions and Errors in Hypothesis Testing

4
Z-TEST

Suppose you think that people living in a particular zip code


have higher-than average IQs. You take a sample of 16
people from that zip code, give them IQ tests, tabulate the
results, and calculate the statistics. For the population of IQ
scores, μ = 100 and σ = 16.

The hypotheses are:


Ho: μ ZIP code ≤ 100
H1: μ ZIP code > 100

Assume σ = .05 and Critical Value Equivalent =1.65 and


Sample mean = 107.5

= (107.5-100)/(16/ 𝟏𝟔) = 1.94

Reject = Ho: Zcritical < Zcalculated


5
Activity
Twenty five high school students complete a preparation
program for taking the SAT test. Here are the SAT scores
from the 25 students who completed the SAT prep
program:
434 694 457 534 720 400 484 478 610 641 425 636 454
514 563 370 499 640 501 625 612 471 598 509 531

Given: Population Mean =500


Population SD=100

What is the Hypothesis?

6
T-TEST

FarKlempt Robotics, Inc., markets microrobots. They claim


their product averages four defects per unit. A consumer
group believes this average is higher. The consumer group
takes a sample of nine FarKlempt microrobots and finds an
average of seven defects, with a standard deviation of 3.16.
The hypothesis test is:
.
The hypotheses are:
Ho: μ Robot Unit ≤ 4
H1: μ Robot Unit > 4

Assume σ = .05 and Critical Value Equivalent =1.65 and


Sample mean =7

= (7-4)/(3.16/ 𝟗) = 2.85

Reject Ho, Tcritical < TCalculated


7
Testing a Variance
CHI-SQUARE
Used to determine whether there is a significant difference
between the expected frequencies and the observed
frequencies in one or more categories.

N is the number of scores in the sample,


s2 is the sample variance,
σ2 is the population variance specified in Ho.

8
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 1: Make a table with columns and Input Value

9
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 2: Input Expected value( assume all of them are Equal)

10
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 3: Get the Difference

11
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 4: Squared the Difference

12
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 4: Squared the Difference

13
Example
256 visual artists were surveyed to find out their zodiac sign.
The results were: Aries (29), Taurus (24), Gemini (22), Cancer
(19), Leo (21), Virgo (18), Libra (19), Scorpio (20), Sagittarius
(23), Capricorn (18), Aquarius (20), Pisces (23). Test the
hypothesis that zodiac signs are evenly distributed across
visual artists.

Step 4: Get the Sum of Component

14
How ANOVA Works
ANOVA compares two types of variances:
the variance within each sample
the variance between different samples.

The red arrows show the


variation of the sample means
around the grand mean (the
variance between).

The black dotted arrows show the per-sample variation of the


individual data points around the sample mean (the variance
within). 15
How to Conduct ANOVA
Student Grade
Prelim Midterm Finals
82 71 64
93 62 73
61 85 87
74 94 91
69 78 56
70 66 78
53 71 87

16
1. Set up hypotheses and
determine level of significance
H0: μPrelim = μMidterm = μFinals

H1: Means are not all equal

Significance Error
α = 0.05

Confidence level =95%, Whatever the Results we are


95% SURE!

17
2. Select the appropriate test statistic.
The test statistic is the F statistic for ANOVA,
F=MSB(Between)/MSE(Within).
Degrees
Source of of
Sums of Squares (SS) Mean Squares (MS) F
Variation Freedom
(df)
Between
Treatme k-1
nts
Error (or
Residual/ N-k
Within)

Total N-1

18
Step 3. Set up decision rule.
Find the F-Critical=(df1, df2)

Degrees of Freedom for Observations

df1= k-1 ,3-1=2

df2 = N-k, 21-3=18

Reject H0 if F > 3.55

k = the number of treatments or independent comparison


groups, and
N = total number of observations or total sample size

19
4.Compute the test statistic.
4.1. Get mean of all Sub Group
Prelim Midterm Finals
82.00 71 64
93.00 62 73
61.00 85 87
74.00 94 91
69.00 78 56
70.00 66 78
53.00 71 87

71.71 75.29 76.57


Prelim Mean Midterm Mean Finals Mean
Grand mean 74.52

20
4.Compute the test statistic.
4.2. Calculate Sum of SquareS

Sum of Squares Between

SSB=7∗(71.71−74.52) 2+7∗(75.29−74.52)2 +7∗(75.57−74.52) 2 =88.67

Sum of Squares WITHIN(ERROR)

SSE=(80−71.71)2 +(93−71.71)2 +(61−71.71)2 + ⋯ + (53−71.71) 2


+(71−75.29)2 +(62−75.29) 2 +(85−75.29)2 +….+(71−75.29)2
+(64−75.57)2 +(73−75.57)2 +(87−75.57)2 +…+(87−75.57)2

= 2,812.57

21
4.Compute the test statistic.
4.3. Calculate Mean of Squares

Mean of Squares Between

MSB=88.67/2

=44.33

Mean of Squares WITHIN(ERROR)

MSE=2,812.57 / 18

= 156.25

22
5.Compute the F- Ratio

Source of Variation Sums of Squares (SS) Degrees of Freedom (df) Mean Squares (MS) F
Between Treatments 88.67 2 44.33333333 0.28
Error (or Residual) 2,812.57 18 156.2539683
Total 2,901.24 20

23
THANK YOU!

24

Вам также может понравиться