SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
Lecture 11 - The T-test
C2 Foundation Mathematics (Standard Track)
Dr Linda Stringer Dr Simon Craik
l.stringer@uea.ac.uk s.craik@uea.ac.uk
INTO City/UEA London
Hypothesis testing
We use hypothesis testing to compare the mean of a very large
data set, a population mean, with the mean of a sample data
set, a sample mean.
Z-test question: A lightbulb company says their lightbulbs last a
mean time of 1000 hours with a standard deviation of 50. We
think their lightbulbs last longer than this and propose a test at
a 5% level of significance. We buy 75 lightbulbs and they last a
mean time of 1022 hours.
The population mean is 1000 hours (A = 1000).
The sample is the 75 light bulbs that we test (n = 75).
The sample mean is 1022 hours (¯x = 1022.)
Z-test example
A lightbulb company says their lightbulbs last a mean time of
1000 hours with a standard deviation of 50. We think their
lightbulbs last longer than this and propose a test at a 5% level
of significance. We buy 75 lightbulbs and they last a mean time
of 1022 hours.
Hypotheses: H0 : µ = 1000, H1 : µ > 1000
Critical value: +1.65
Test statistic: ¯x−A
σ/
√
n
= 1022−1000
50/
√
75
= 3.81 to 2 d.p.
Decision: 3.81 > 1.65 so reject H0
Conclusion: The sample provides sufficient evidence at
5% significance level to reject null hypothesis; the
lightbulbs last longer than 1000 hours.
Z-test summary
You will be given
1. Population mean, A
2. Population standard deviation, σ
3. Significance level (1% or 5%)
4. Sample mean, ¯x
5. Sample size, n
6. Quantifying word.
You have to work out
1. Null hypothesis, alternative hypotheis
2. Critical value(s)
3. Test statistic
4. Decision - accept/reject H0 (sketch a picture if it helps)
5. Conclusion
The difference between a Z-test and a T-test
In a Z-test the sample is large (n ≥ 25). You are given the
sample mean and population or sample standard deviation
In a T-test the sample is small (n < 25). You usually have to
work out the sample mean and the sample standard deviation.
Also in a T-test you have to work out the degrees of freedom to
use in the critical value table.
d.o.f. = n − 1
T-test summary
You will be given
1. Population mean, A
2. Significance level
3. Sample data set
4. Quantifying word.
You have to work out
1. Null hypothesis (H0 : µ = A) and alternative hypotheis
2. Degrees of freedom, d.o.f. = n − 1
3. Critical value(s), look this up in the table
4. Sample mean, ¯x = Σx
n
5. Sample standard deviation, s = x2−n¯x2
n−1
(MAKE SURE YOU CALCULATE s, not σ)
6. Test statistic, ¯x−A
s/
√
n
7. Decision, accept/reject H0 (sketch a picture if it helps)
8. Conclusion, write this in words
The null hypothesis and the alternative hypothesis for
the Z-test and T-test
The null hypothesis is initially assumed to be true. It is
H0 : µ = A
where µ is ’population mean’ and A is the hypothetical
value of the population mean
The alternative hypothesis is either
H1 : µ = A or H1 : µ < A or H1 : µ > A
Sample data is collected and tested to see if it is consistent
with the null hypothesis. If the sample mean is significantly
different from the population mean, H0 is rejected in favour
of the alternative hypothesis, H1.
Significance level
The null hypothesis will always be tested to a given level of
significance.
A 5% level of significance means we are testing to see if
the probability of getting the sample mean is less than
0.05. If the probability is less we reject the null hypothesis
in favour of the alternative hypothesis.
A 1% level of significance translates to a probability of 0.01.
Critical value (T-test)
The critical value is the boundary (or boundaries) of the
rejection region(s). In a T-test this depends on the alternative
hypothesis, significance level and degrees of freedom
(d.o.f. = n − 1, where n is the number of values in the data set)
5% significance level 1% significance level
d.o.f. One-tailed Two-tailed One-tailed Two-tailed
2 2.92 4.30 6.97 9.93
3 2.35 3.18 4.54 5.84
4 2.13 2.78 3.75 4.60
5 2.02 2.57 3.37 4.03
6 1.94 2.45 3.14 3.71
7 1.90 2.37 3.00 3.50
8 1.86 2.31 2.90 3.36
9 1.83 2.26 2.82 3.25
10 1.81 2.23 2.76 3.17
Degrees of freedom (T-test)
The degrees of freedom of a set of data is a way of
measuring how the tests effect each other.
If the data has size n and each sample does not effect any
others the degree of freedom is n − 1. (This is usually the
case with our data).
Consider a bag containing 10 stones.
If as a sample we pick out 10 stones our degree of
freedom is 0 because the choice of the first one constrains
the possibilities for all others and the final one is left with
no choices.
If as a sample we pick out 7 stones our degree of freedom
is 3 because if we take out three stones before we start the
choice of stones is unique.
If as a sample we just pick out 1 stone our degree of
freedom is 9.
H1 : µ = A
If our alternative hypothesis is H1 : µ = A we are doing a
two-tailed test and we have 2 critical values, one negative and
one positive.
The critical value is the boundary of the rejection region.
For a 5% level of significance we have the following picture:
−2.31 2.31
The rejection (shaded) regions have a combined area of 0.05.
H1 : µ > A
If our alternative hypothesis is H1 : µ > A we are doing a
one-tailed test and we have 1 critical value which is positive.
The critical value is the boundary of the rejection region.
For a 5% level of significance we have the following picture:
1.86
The rejection region has an area of 0.05.
H1 : µ < A
If our alternative hypothesis is H1 : µ < A we are doing a
one-tailed test and we have 1 critical value which is negative.
The critical value is the boundary of the rejection region.
For a 5% level of significance we have the following picture:
−1.86
The rejection region has an area of 0.05.
Sample mean and sample standard deviation
The sample mean, ¯x is the mean ¯x = Σx
n
The sample standard deviation, s of a set of data is slightly
different from the standard deviation σ. It is important to
use the correct formula.
For a T-test question ALWAYS use the sample variance
formula
s2
=
x2 − n¯x2
n − 1
For a T-test question DO NOT USE the variance formula
from Lecture 10
σ2
=
x − ¯x
n
=
x2
n
− ¯x2
(We are using the sample data to work out an
approximation to the population variance)
Test statistic and conclusion
The test statistic is difference between the sample mean, ¯x
and the (hypothetical) population mean A, divided by the
standard error.
The standard error is σ/
√
n for the Z-test and s/
√
n for the
T-test, where n is the sample size, σ is the population
standard deviation and s is the sample standard deviation.
The T-test statistic is
¯x − A
s/
√
n
If the test statistic lies beyond the critical value(s) (in the
rejection region) we reject H0. We say THERE IS
SUFFICIENT EVIDENCE TO REJECT H0.
If the test statistic does not lie beyond the critical value, we
accept H0. We say THERE IS NOT SUFFICIENT
EVIDENCE TO REJECT H0
Normal distribution X ∼ N(µ, σ2
) and the theory
behind the Z-test and the T-test
If samples of size n are taken from a population with mean A
and standard deviation σ, then the sample means are
distributed normally, with mean A and standard deviation σ/
√
n.
−4 −2 2 4
0.1
0.2
0.3
0.4
0.5
x
y
When we calculate the test statistic, we are calculating the
Z-score of the sample mean. The critical value is the Z-score of
a sample mean which we have a 5% (or 1%) probability of
obtaining. For further information, try a statistics book from the
library, or the khanacademy videos on youtube.
T-test - Example 1
A light bulb company claim their light bulbs last an average of
1000 hours. We want to test whether this is true to a 5% level of
significance.
H0: µ = 1000.
H1: µ = 1000.
We test a sample of 10 light bulbs. Their lifetimes in hours are
listed below.
1020, 860, 987, 1109, 1015, 952, 964, 1007, 1082, 1017
Degrees of freedom:(d.o.f. = n − 1) 10-1=9
Critical values: We are doing a two-tailed test as our
alternative hypothesis says µ = 1000. Look up 5% with 9
degrees of freedom for the critical value.
Our critical values are -2.26 and 2.26.
T-test - Example 1
Sample mean: ¯x = 1001.3.
Sample standard deviation:
s2
=
x2 − n¯x2
n − 1
= 4768.9
s =
√
4768.9 = 69.057
Test statistic:
¯x − A
s/
√
n
=
1001.3 − 1000
69.057/
√
10
= 0.06
Decision: −2.26 < 0.06 < 2.26 .The test statistic is not in
the rejection region so we accept the null hypothesis.
Conclusion: The sample of 10 light bulbs does not provide
sufficient evidence at a 5% significance level to reject the
light bulb company’s claim; the average bulb lifetime is
1000 hours
T-test - Example 2
An average person is said to be able run to 100m in 14.2
seconds. We think that this is a bit on the slow side. We decide
to test at a 5% level of significance.
H0 : µ = 14.2
H1 : µ < 14.2.
We ask 7 people to run 100m. Their times are as follows:
12.6, 13.2, 11.7, 14.6, 11.3, 12.0, 13.5
The degree of freedom of this set is 7-1=6
We are doing a one-tailed test as our alternative
hypothesis says µ < 14.2. Look up 5% with 6 degrees of
freedom for the critical value.
The critical value is −1.94.
T-test - Example 2
Sample mean ¯x = 12.7.
Sample standard deviation
s2
=
x2 − n¯x2
n − 1
= 1.327
s =
√
1.327 = 1.152
Test statistic
T =
¯x − A
s/
√
n
=
12.7 − 14.2
1.152/
√
7
= −3.45
Decision: −3.45 < −1.94 so we reject the null hypothesis.
Conclusion: The data collected provides sufficient
evidence at a 5% significance level to reject the claim that
the average person runs 100m in 14.2s; people run faster
than this.
T-test - Example 3
An average person has an IQ of 100. We think that we are
cleverer than this so we test at a 1% level of significance.
H0 : µ = 100.
H1 : µ > 100.
We got 8 people to take an IQ test. Their marks were as
follows:
117, 106, 93, 142, 110, 114, 120, 126
The degree of freedom of this set is 8-1=7
We are doing a one-tailed test as our alternative
hypothesis says µ > 100. Look up 1% with 7 degrees of
freedom for the critical value.
The critical value is 3.00.
T-test - Example 3
Sample mean ¯x = 116.
Sample standard deviation
s2
=
x2 − n¯x2
n − 1
= 208.857
s = 14.452
Test statistic
¯x − A
s/
√
n
=
116 − 100
14.452/
√
8
= 3.13
Decision: 3.00 < 3.13 so we reject the null hypothesis.
Conclusion: The sample of 8 people provides sufficient
evidence at a 1% significance level to reject the claim that
the average IQ is100; people are more intelligent than this.
T-test - Example 4
The chocolate company claims that a bag of malteasers
has an average of 20 malteasers inside. In the name of
science we buy 6 bags to see if this is right to a 1% level of
significance. The bags have the following number of
malteasers:
19, 16, 18, 19, 22, 14
H0 : µ = 20.
H1 : µ = 20.
Degree of freedom is 6-1=5.
We are doing a two-tailed test as our alternative hypothesis
says µ = 20. Look up 1% with 5 degrees of freedom for the
critical values.
The critical values are −4.03 and 4.03.
T-test - Example 4
Sample mean ¯x = 18.
Sample standard deviation
s2
=
x2 − n¯x2
n − 1
= 7.6
s = 2.757
Test statistic
T =
¯x − A
s/
√
n
=
18 − 20
2.757/
√
6
= −1.78
Decision: −4.03 < −1.78 < 4.03 so we accept the null
hypothesis.
Conclusion: The sample of 6 bags of maltesers does not
provide sufficient evidence at a 1% significance level to
reject the chocolate company’s claim; there is an average
of 18 maltesers per bag.

Más contenido relacionado

La actualidad más candente

Measures of central tendency (ungrouped data)
Measures of central tendency (ungrouped data)Measures of central tendency (ungrouped data)
Measures of central tendency (ungrouped data)LilianneSoriano
 
Statistical treatment of data
Statistical treatment of dataStatistical treatment of data
Statistical treatment of datasenseiDelfin
 
Discrete Probability Distributions
Discrete Probability DistributionsDiscrete Probability Distributions
Discrete Probability Distributionsmandalina landy
 
Confidence Intervals And The T Distribution
Confidence Intervals And The T   DistributionConfidence Intervals And The T   Distribution
Confidence Intervals And The T DistributionDarren Barton
 
Advanced statistics Lesson 1
Advanced statistics Lesson 1Advanced statistics Lesson 1
Advanced statistics Lesson 1Cliffed Echavez
 
Maka diyos,makakalikasa, makatao,makabansa2
Maka diyos,makakalikasa, makatao,makabansa2Maka diyos,makakalikasa, makatao,makabansa2
Maka diyos,makakalikasa, makatao,makabansa2RuthCabuhan1
 
Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1yhchung
 
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHON
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHONTHESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHON
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHONMi L
 
The nineteenth century philippine economy society and
The nineteenth century philippine economy society andThe nineteenth century philippine economy society and
The nineteenth century philippine economy society andEdmundo Dantes
 
Chapter 2 understanding the normal curve distribution
Chapter 2   understanding the normal curve distributionChapter 2   understanding the normal curve distribution
Chapter 2 understanding the normal curve distributionAntonio F. Balatar Jr.
 
STATISTICS AND PROBABILITY (TEACHING GUIDE)
STATISTICS AND PROBABILITY (TEACHING GUIDE)STATISTICS AND PROBABILITY (TEACHING GUIDE)
STATISTICS AND PROBABILITY (TEACHING GUIDE)PRINTDESK by Dan
 
Successful filipino entrepreneurs
Successful filipino entrepreneursSuccessful filipino entrepreneurs
Successful filipino entrepreneursNeilfieOrit2
 

La actualidad más candente (20)

Filipino values
Filipino valuesFilipino values
Filipino values
 
The rizal bill
The rizal billThe rizal bill
The rizal bill
 
History
HistoryHistory
History
 
Measures of central tendency (ungrouped data)
Measures of central tendency (ungrouped data)Measures of central tendency (ungrouped data)
Measures of central tendency (ungrouped data)
 
QUARTILES, DECILES AND PERCENTILES
QUARTILES, DECILES  AND PERCENTILESQUARTILES, DECILES  AND PERCENTILES
QUARTILES, DECILES AND PERCENTILES
 
Statistical treatment of data
Statistical treatment of dataStatistical treatment of data
Statistical treatment of data
 
statistics Lesson 1
statistics Lesson 1statistics Lesson 1
statistics Lesson 1
 
Discrete Probability Distributions
Discrete Probability DistributionsDiscrete Probability Distributions
Discrete Probability Distributions
 
Population and sample mean
Population and sample meanPopulation and sample mean
Population and sample mean
 
Confidence Intervals And The T Distribution
Confidence Intervals And The T   DistributionConfidence Intervals And The T   Distribution
Confidence Intervals And The T Distribution
 
Advanced statistics Lesson 1
Advanced statistics Lesson 1Advanced statistics Lesson 1
Advanced statistics Lesson 1
 
Maka diyos,makakalikasa, makatao,makabansa2
Maka diyos,makakalikasa, makatao,makabansa2Maka diyos,makakalikasa, makatao,makabansa2
Maka diyos,makakalikasa, makatao,makabansa2
 
Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1
 
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHON
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHONTHESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHON
THESIS - WIKANG FILIPINO, SA MAKABAGONG PANAHON
 
The nineteenth century philippine economy society and
The nineteenth century philippine economy society andThe nineteenth century philippine economy society and
The nineteenth century philippine economy society and
 
Chapter 2 understanding the normal curve distribution
Chapter 2   understanding the normal curve distributionChapter 2   understanding the normal curve distribution
Chapter 2 understanding the normal curve distribution
 
83643008 oblicon-mcq
83643008 oblicon-mcq83643008 oblicon-mcq
83643008 oblicon-mcq
 
STATISTICS AND PROBABILITY (TEACHING GUIDE)
STATISTICS AND PROBABILITY (TEACHING GUIDE)STATISTICS AND PROBABILITY (TEACHING GUIDE)
STATISTICS AND PROBABILITY (TEACHING GUIDE)
 
Successful filipino entrepreneurs
Successful filipino entrepreneursSuccessful filipino entrepreneurs
Successful filipino entrepreneurs
 
Elementary Statistics
Elementary Statistics Elementary Statistics
Elementary Statistics
 

Destacado

Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleAhmadullah
 
Hypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-testHypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-testShakehand with Life
 
Religion seminar activity_group_1_religion_oppression_and_transformation
Religion seminar activity_group_1_religion_oppression_and_transformationReligion seminar activity_group_1_religion_oppression_and_transformation
Religion seminar activity_group_1_religion_oppression_and_transformationfatima d
 
C2 st lecture 13 revision for test b handout
C2 st lecture 13   revision for test b handoutC2 st lecture 13   revision for test b handout
C2 st lecture 13 revision for test b handoutfatima d
 
C2 st lecture 4 handout
C2 st lecture 4 handoutC2 st lecture 4 handout
C2 st lecture 4 handoutfatima d
 
Homework reading task government and politics
Homework reading task government and politicsHomework reading task government and politics
Homework reading task government and politicsfatima d
 
Un covenant economioc social cultural
Un covenant economioc social culturalUn covenant economioc social cultural
Un covenant economioc social culturalfatima d
 
Un covenant civil political rights
Un covenant civil political rightsUn covenant civil political rights
Un covenant civil political rightsfatima d
 
C2 st lecture 12 the chi squared-test handout
C2 st lecture 12   the chi squared-test handoutC2 st lecture 12   the chi squared-test handout
C2 st lecture 12 the chi squared-test handoutfatima d
 
C2 st lecture 6 handout
C2 st lecture 6 handoutC2 st lecture 6 handout
C2 st lecture 6 handoutfatima d
 
15 development issues
15 development issues15 development issues
15 development issuesfatima d
 
C2 st lecture 2 handout
C2 st lecture 2 handoutC2 st lecture 2 handout
C2 st lecture 2 handoutfatima d
 
12a beyond bipolarity fukuyama and huntington
12a  beyond bipolarity   fukuyama and huntington12a  beyond bipolarity   fukuyama and huntington
12a beyond bipolarity fukuyama and huntingtonfatima d
 
Social stratification and divisionssept12 intake
Social stratification and divisionssept12 intakeSocial stratification and divisionssept12 intake
Social stratification and divisionssept12 intakefatima d
 
C2 st lecture 9 probability handout
C2 st lecture 9   probability handoutC2 st lecture 9   probability handout
C2 st lecture 9 probability handoutfatima d
 
12b beyond unipolarity
12b beyond unipolarity12b beyond unipolarity
12b beyond unipolarityfatima d
 
09 non governmental organisations
09  non governmental organisations09  non governmental organisations
09 non governmental organisationsfatima d
 
10 terrorism
10 terrorism10 terrorism
10 terrorismfatima d
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handoutfatima d
 
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...Lawrence kok
 

Destacado (20)

Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two Sample
 
Hypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-testHypothesis testing; z test, t-test. f-test
Hypothesis testing; z test, t-test. f-test
 
Religion seminar activity_group_1_religion_oppression_and_transformation
Religion seminar activity_group_1_religion_oppression_and_transformationReligion seminar activity_group_1_religion_oppression_and_transformation
Religion seminar activity_group_1_religion_oppression_and_transformation
 
C2 st lecture 13 revision for test b handout
C2 st lecture 13   revision for test b handoutC2 st lecture 13   revision for test b handout
C2 st lecture 13 revision for test b handout
 
C2 st lecture 4 handout
C2 st lecture 4 handoutC2 st lecture 4 handout
C2 st lecture 4 handout
 
Homework reading task government and politics
Homework reading task government and politicsHomework reading task government and politics
Homework reading task government and politics
 
Un covenant economioc social cultural
Un covenant economioc social culturalUn covenant economioc social cultural
Un covenant economioc social cultural
 
Un covenant civil political rights
Un covenant civil political rightsUn covenant civil political rights
Un covenant civil political rights
 
C2 st lecture 12 the chi squared-test handout
C2 st lecture 12   the chi squared-test handoutC2 st lecture 12   the chi squared-test handout
C2 st lecture 12 the chi squared-test handout
 
C2 st lecture 6 handout
C2 st lecture 6 handoutC2 st lecture 6 handout
C2 st lecture 6 handout
 
15 development issues
15 development issues15 development issues
15 development issues
 
C2 st lecture 2 handout
C2 st lecture 2 handoutC2 st lecture 2 handout
C2 st lecture 2 handout
 
12a beyond bipolarity fukuyama and huntington
12a  beyond bipolarity   fukuyama and huntington12a  beyond bipolarity   fukuyama and huntington
12a beyond bipolarity fukuyama and huntington
 
Social stratification and divisionssept12 intake
Social stratification and divisionssept12 intakeSocial stratification and divisionssept12 intake
Social stratification and divisionssept12 intake
 
C2 st lecture 9 probability handout
C2 st lecture 9   probability handoutC2 st lecture 9   probability handout
C2 st lecture 9 probability handout
 
12b beyond unipolarity
12b beyond unipolarity12b beyond unipolarity
12b beyond unipolarity
 
09 non governmental organisations
09  non governmental organisations09  non governmental organisations
09 non governmental organisations
 
10 terrorism
10 terrorism10 terrorism
10 terrorism
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handout
 
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
 

Similar a C2 st lecture 11 the t-test handout

Point Estimate, Confidence Interval, Hypotesis tests
Point Estimate, Confidence Interval, Hypotesis testsPoint Estimate, Confidence Interval, Hypotesis tests
Point Estimate, Confidence Interval, Hypotesis testsUniversity of Salerno
 
hypothesisTestPPT.pptx
hypothesisTestPPT.pptxhypothesisTestPPT.pptx
hypothesisTestPPT.pptxdangwalakash07
 
Application of Statistical and mathematical equations in Chemistry Part 2
Application of Statistical and mathematical equations in Chemistry Part 2Application of Statistical and mathematical equations in Chemistry Part 2
Application of Statistical and mathematical equations in Chemistry Part 2Awad Albalwi
 
Descriptive Statistics Formula Sheet Sample Populatio.docx
Descriptive Statistics Formula Sheet    Sample Populatio.docxDescriptive Statistics Formula Sheet    Sample Populatio.docx
Descriptive Statistics Formula Sheet Sample Populatio.docxsimonithomas47935
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testdr.balan shaikh
 
Fundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data DescriptionsFundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data Descriptionsemonfahim11
 
Estimating population values ppt @ bec doms
Estimating population values ppt @ bec domsEstimating population values ppt @ bec doms
Estimating population values ppt @ bec domsBabasab Patil
 

Similar a C2 st lecture 11 the t-test handout (20)

Point Estimate, Confidence Interval, Hypotesis tests
Point Estimate, Confidence Interval, Hypotesis testsPoint Estimate, Confidence Interval, Hypotesis tests
Point Estimate, Confidence Interval, Hypotesis tests
 
TEST OF SIGNIFICANCE.pptx
TEST OF SIGNIFICANCE.pptxTEST OF SIGNIFICANCE.pptx
TEST OF SIGNIFICANCE.pptx
 
Talk 3
Talk 3Talk 3
Talk 3
 
hypothesisTestPPT.pptx
hypothesisTestPPT.pptxhypothesisTestPPT.pptx
hypothesisTestPPT.pptx
 
STATISTIC ESTIMATION
STATISTIC ESTIMATIONSTATISTIC ESTIMATION
STATISTIC ESTIMATION
 
U unit8 ksb
U unit8 ksbU unit8 ksb
U unit8 ksb
 
Application of Statistical and mathematical equations in Chemistry Part 2
Application of Statistical and mathematical equations in Chemistry Part 2Application of Statistical and mathematical equations in Chemistry Part 2
Application of Statistical and mathematical equations in Chemistry Part 2
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Descriptive Statistics Formula Sheet Sample Populatio.docx
Descriptive Statistics Formula Sheet    Sample Populatio.docxDescriptive Statistics Formula Sheet    Sample Populatio.docx
Descriptive Statistics Formula Sheet Sample Populatio.docx
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square test
 
hypothesis.pptx
hypothesis.pptxhypothesis.pptx
hypothesis.pptx
 
Fundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data DescriptionsFundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data Descriptions
 
Estimating population values ppt @ bec doms
Estimating population values ppt @ bec domsEstimating population values ppt @ bec doms
Estimating population values ppt @ bec doms
 
Test of significance
Test of significanceTest of significance
Test of significance
 
Day 3 SPSS
Day 3 SPSSDay 3 SPSS
Day 3 SPSS
 
Hypothesis testing Part1
Hypothesis testing Part1Hypothesis testing Part1
Hypothesis testing Part1
 
Goodness of fit (ppt)
Goodness of fit (ppt)Goodness of fit (ppt)
Goodness of fit (ppt)
 
Parametric test
Parametric testParametric test
Parametric test
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 

Más de fatima d

17 china and the developing world
17 china and the developing world17 china and the developing world
17 china and the developing worldfatima d
 
16 development assistance
16 development assistance16 development assistance
16 development assistancefatima d
 
Cairo declaration 1990
Cairo declaration 1990Cairo declaration 1990
Cairo declaration 1990fatima d
 
Un declaration of human rights
Un declaration of human rightsUn declaration of human rights
Un declaration of human rightsfatima d
 
C2 st lecture 5 handout
C2 st lecture 5 handoutC2 st lecture 5 handout
C2 st lecture 5 handoutfatima d
 
C2 st lecture 3 handout
C2 st lecture 3 handoutC2 st lecture 3 handout
C2 st lecture 3 handoutfatima d
 
C2 st lecture 8 pythagoras and trigonometry handout
C2 st lecture 8   pythagoras and trigonometry handoutC2 st lecture 8   pythagoras and trigonometry handout
C2 st lecture 8 pythagoras and trigonometry handoutfatima d
 
Foundation c2 exam june 2013 resit 2 sols
Foundation c2 exam june 2013 resit 2 solsFoundation c2 exam june 2013 resit 2 sols
Foundation c2 exam june 2013 resit 2 solsfatima d
 
Foundation c2 exam may 2013 sols
Foundation c2 exam may 2013 solsFoundation c2 exam may 2013 sols
Foundation c2 exam may 2013 solsfatima d
 
Foundation c2 exam june 2013 resit sols
Foundation c2 exam june 2013 resit solsFoundation c2 exam june 2013 resit sols
Foundation c2 exam june 2013 resit solsfatima d
 
Ft test b jan 2012 sols
Ft test b jan 2012 solsFt test b jan 2012 sols
Ft test b jan 2012 solsfatima d
 
Foundation c2 exam august 2012 sols
Foundation c2 exam august 2012 solsFoundation c2 exam august 2012 sols
Foundation c2 exam august 2012 solsfatima d
 
Seminar activity 3 the search for intimacy
Seminar activity 3 the search for intimacySeminar activity 3 the search for intimacy
Seminar activity 3 the search for intimacyfatima d
 
Homework reading task crime
Homework reading task crimeHomework reading task crime
Homework reading task crimefatima d
 

Más de fatima d (14)

17 china and the developing world
17 china and the developing world17 china and the developing world
17 china and the developing world
 
16 development assistance
16 development assistance16 development assistance
16 development assistance
 
Cairo declaration 1990
Cairo declaration 1990Cairo declaration 1990
Cairo declaration 1990
 
Un declaration of human rights
Un declaration of human rightsUn declaration of human rights
Un declaration of human rights
 
C2 st lecture 5 handout
C2 st lecture 5 handoutC2 st lecture 5 handout
C2 st lecture 5 handout
 
C2 st lecture 3 handout
C2 st lecture 3 handoutC2 st lecture 3 handout
C2 st lecture 3 handout
 
C2 st lecture 8 pythagoras and trigonometry handout
C2 st lecture 8   pythagoras and trigonometry handoutC2 st lecture 8   pythagoras and trigonometry handout
C2 st lecture 8 pythagoras and trigonometry handout
 
Foundation c2 exam june 2013 resit 2 sols
Foundation c2 exam june 2013 resit 2 solsFoundation c2 exam june 2013 resit 2 sols
Foundation c2 exam june 2013 resit 2 sols
 
Foundation c2 exam may 2013 sols
Foundation c2 exam may 2013 solsFoundation c2 exam may 2013 sols
Foundation c2 exam may 2013 sols
 
Foundation c2 exam june 2013 resit sols
Foundation c2 exam june 2013 resit solsFoundation c2 exam june 2013 resit sols
Foundation c2 exam june 2013 resit sols
 
Ft test b jan 2012 sols
Ft test b jan 2012 solsFt test b jan 2012 sols
Ft test b jan 2012 sols
 
Foundation c2 exam august 2012 sols
Foundation c2 exam august 2012 solsFoundation c2 exam august 2012 sols
Foundation c2 exam august 2012 sols
 
Seminar activity 3 the search for intimacy
Seminar activity 3 the search for intimacySeminar activity 3 the search for intimacy
Seminar activity 3 the search for intimacy
 
Homework reading task crime
Homework reading task crimeHomework reading task crime
Homework reading task crime
 

Último

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Último (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

C2 st lecture 11 the t-test handout

  • 1. Lecture 11 - The T-test C2 Foundation Mathematics (Standard Track) Dr Linda Stringer Dr Simon Craik l.stringer@uea.ac.uk s.craik@uea.ac.uk INTO City/UEA London
  • 2. Hypothesis testing We use hypothesis testing to compare the mean of a very large data set, a population mean, with the mean of a sample data set, a sample mean. Z-test question: A lightbulb company says their lightbulbs last a mean time of 1000 hours with a standard deviation of 50. We think their lightbulbs last longer than this and propose a test at a 5% level of significance. We buy 75 lightbulbs and they last a mean time of 1022 hours. The population mean is 1000 hours (A = 1000). The sample is the 75 light bulbs that we test (n = 75). The sample mean is 1022 hours (¯x = 1022.)
  • 3. Z-test example A lightbulb company says their lightbulbs last a mean time of 1000 hours with a standard deviation of 50. We think their lightbulbs last longer than this and propose a test at a 5% level of significance. We buy 75 lightbulbs and they last a mean time of 1022 hours. Hypotheses: H0 : µ = 1000, H1 : µ > 1000 Critical value: +1.65 Test statistic: ¯x−A σ/ √ n = 1022−1000 50/ √ 75 = 3.81 to 2 d.p. Decision: 3.81 > 1.65 so reject H0 Conclusion: The sample provides sufficient evidence at 5% significance level to reject null hypothesis; the lightbulbs last longer than 1000 hours.
  • 4. Z-test summary You will be given 1. Population mean, A 2. Population standard deviation, σ 3. Significance level (1% or 5%) 4. Sample mean, ¯x 5. Sample size, n 6. Quantifying word. You have to work out 1. Null hypothesis, alternative hypotheis 2. Critical value(s) 3. Test statistic 4. Decision - accept/reject H0 (sketch a picture if it helps) 5. Conclusion
  • 5. The difference between a Z-test and a T-test In a Z-test the sample is large (n ≥ 25). You are given the sample mean and population or sample standard deviation In a T-test the sample is small (n < 25). You usually have to work out the sample mean and the sample standard deviation. Also in a T-test you have to work out the degrees of freedom to use in the critical value table. d.o.f. = n − 1
  • 6. T-test summary You will be given 1. Population mean, A 2. Significance level 3. Sample data set 4. Quantifying word. You have to work out 1. Null hypothesis (H0 : µ = A) and alternative hypotheis 2. Degrees of freedom, d.o.f. = n − 1 3. Critical value(s), look this up in the table 4. Sample mean, ¯x = Σx n 5. Sample standard deviation, s = x2−n¯x2 n−1 (MAKE SURE YOU CALCULATE s, not σ) 6. Test statistic, ¯x−A s/ √ n 7. Decision, accept/reject H0 (sketch a picture if it helps) 8. Conclusion, write this in words
  • 7. The null hypothesis and the alternative hypothesis for the Z-test and T-test The null hypothesis is initially assumed to be true. It is H0 : µ = A where µ is ’population mean’ and A is the hypothetical value of the population mean The alternative hypothesis is either H1 : µ = A or H1 : µ < A or H1 : µ > A Sample data is collected and tested to see if it is consistent with the null hypothesis. If the sample mean is significantly different from the population mean, H0 is rejected in favour of the alternative hypothesis, H1.
  • 8. Significance level The null hypothesis will always be tested to a given level of significance. A 5% level of significance means we are testing to see if the probability of getting the sample mean is less than 0.05. If the probability is less we reject the null hypothesis in favour of the alternative hypothesis. A 1% level of significance translates to a probability of 0.01.
  • 9. Critical value (T-test) The critical value is the boundary (or boundaries) of the rejection region(s). In a T-test this depends on the alternative hypothesis, significance level and degrees of freedom (d.o.f. = n − 1, where n is the number of values in the data set) 5% significance level 1% significance level d.o.f. One-tailed Two-tailed One-tailed Two-tailed 2 2.92 4.30 6.97 9.93 3 2.35 3.18 4.54 5.84 4 2.13 2.78 3.75 4.60 5 2.02 2.57 3.37 4.03 6 1.94 2.45 3.14 3.71 7 1.90 2.37 3.00 3.50 8 1.86 2.31 2.90 3.36 9 1.83 2.26 2.82 3.25 10 1.81 2.23 2.76 3.17
  • 10. Degrees of freedom (T-test) The degrees of freedom of a set of data is a way of measuring how the tests effect each other. If the data has size n and each sample does not effect any others the degree of freedom is n − 1. (This is usually the case with our data). Consider a bag containing 10 stones. If as a sample we pick out 10 stones our degree of freedom is 0 because the choice of the first one constrains the possibilities for all others and the final one is left with no choices. If as a sample we pick out 7 stones our degree of freedom is 3 because if we take out three stones before we start the choice of stones is unique. If as a sample we just pick out 1 stone our degree of freedom is 9.
  • 11. H1 : µ = A If our alternative hypothesis is H1 : µ = A we are doing a two-tailed test and we have 2 critical values, one negative and one positive. The critical value is the boundary of the rejection region. For a 5% level of significance we have the following picture: −2.31 2.31 The rejection (shaded) regions have a combined area of 0.05.
  • 12. H1 : µ > A If our alternative hypothesis is H1 : µ > A we are doing a one-tailed test and we have 1 critical value which is positive. The critical value is the boundary of the rejection region. For a 5% level of significance we have the following picture: 1.86 The rejection region has an area of 0.05.
  • 13. H1 : µ < A If our alternative hypothesis is H1 : µ < A we are doing a one-tailed test and we have 1 critical value which is negative. The critical value is the boundary of the rejection region. For a 5% level of significance we have the following picture: −1.86 The rejection region has an area of 0.05.
  • 14. Sample mean and sample standard deviation The sample mean, ¯x is the mean ¯x = Σx n The sample standard deviation, s of a set of data is slightly different from the standard deviation σ. It is important to use the correct formula. For a T-test question ALWAYS use the sample variance formula s2 = x2 − n¯x2 n − 1 For a T-test question DO NOT USE the variance formula from Lecture 10 σ2 = x − ¯x n = x2 n − ¯x2 (We are using the sample data to work out an approximation to the population variance)
  • 15. Test statistic and conclusion The test statistic is difference between the sample mean, ¯x and the (hypothetical) population mean A, divided by the standard error. The standard error is σ/ √ n for the Z-test and s/ √ n for the T-test, where n is the sample size, σ is the population standard deviation and s is the sample standard deviation. The T-test statistic is ¯x − A s/ √ n If the test statistic lies beyond the critical value(s) (in the rejection region) we reject H0. We say THERE IS SUFFICIENT EVIDENCE TO REJECT H0. If the test statistic does not lie beyond the critical value, we accept H0. We say THERE IS NOT SUFFICIENT EVIDENCE TO REJECT H0
  • 16. Normal distribution X ∼ N(µ, σ2 ) and the theory behind the Z-test and the T-test If samples of size n are taken from a population with mean A and standard deviation σ, then the sample means are distributed normally, with mean A and standard deviation σ/ √ n. −4 −2 2 4 0.1 0.2 0.3 0.4 0.5 x y When we calculate the test statistic, we are calculating the Z-score of the sample mean. The critical value is the Z-score of a sample mean which we have a 5% (or 1%) probability of obtaining. For further information, try a statistics book from the library, or the khanacademy videos on youtube.
  • 17. T-test - Example 1 A light bulb company claim their light bulbs last an average of 1000 hours. We want to test whether this is true to a 5% level of significance. H0: µ = 1000. H1: µ = 1000. We test a sample of 10 light bulbs. Their lifetimes in hours are listed below. 1020, 860, 987, 1109, 1015, 952, 964, 1007, 1082, 1017 Degrees of freedom:(d.o.f. = n − 1) 10-1=9 Critical values: We are doing a two-tailed test as our alternative hypothesis says µ = 1000. Look up 5% with 9 degrees of freedom for the critical value. Our critical values are -2.26 and 2.26.
  • 18. T-test - Example 1 Sample mean: ¯x = 1001.3. Sample standard deviation: s2 = x2 − n¯x2 n − 1 = 4768.9 s = √ 4768.9 = 69.057 Test statistic: ¯x − A s/ √ n = 1001.3 − 1000 69.057/ √ 10 = 0.06 Decision: −2.26 < 0.06 < 2.26 .The test statistic is not in the rejection region so we accept the null hypothesis. Conclusion: The sample of 10 light bulbs does not provide sufficient evidence at a 5% significance level to reject the light bulb company’s claim; the average bulb lifetime is 1000 hours
  • 19. T-test - Example 2 An average person is said to be able run to 100m in 14.2 seconds. We think that this is a bit on the slow side. We decide to test at a 5% level of significance. H0 : µ = 14.2 H1 : µ < 14.2. We ask 7 people to run 100m. Their times are as follows: 12.6, 13.2, 11.7, 14.6, 11.3, 12.0, 13.5 The degree of freedom of this set is 7-1=6 We are doing a one-tailed test as our alternative hypothesis says µ < 14.2. Look up 5% with 6 degrees of freedom for the critical value. The critical value is −1.94.
  • 20. T-test - Example 2 Sample mean ¯x = 12.7. Sample standard deviation s2 = x2 − n¯x2 n − 1 = 1.327 s = √ 1.327 = 1.152 Test statistic T = ¯x − A s/ √ n = 12.7 − 14.2 1.152/ √ 7 = −3.45 Decision: −3.45 < −1.94 so we reject the null hypothesis. Conclusion: The data collected provides sufficient evidence at a 5% significance level to reject the claim that the average person runs 100m in 14.2s; people run faster than this.
  • 21. T-test - Example 3 An average person has an IQ of 100. We think that we are cleverer than this so we test at a 1% level of significance. H0 : µ = 100. H1 : µ > 100. We got 8 people to take an IQ test. Their marks were as follows: 117, 106, 93, 142, 110, 114, 120, 126 The degree of freedom of this set is 8-1=7 We are doing a one-tailed test as our alternative hypothesis says µ > 100. Look up 1% with 7 degrees of freedom for the critical value. The critical value is 3.00.
  • 22. T-test - Example 3 Sample mean ¯x = 116. Sample standard deviation s2 = x2 − n¯x2 n − 1 = 208.857 s = 14.452 Test statistic ¯x − A s/ √ n = 116 − 100 14.452/ √ 8 = 3.13 Decision: 3.00 < 3.13 so we reject the null hypothesis. Conclusion: The sample of 8 people provides sufficient evidence at a 1% significance level to reject the claim that the average IQ is100; people are more intelligent than this.
  • 23. T-test - Example 4 The chocolate company claims that a bag of malteasers has an average of 20 malteasers inside. In the name of science we buy 6 bags to see if this is right to a 1% level of significance. The bags have the following number of malteasers: 19, 16, 18, 19, 22, 14 H0 : µ = 20. H1 : µ = 20. Degree of freedom is 6-1=5. We are doing a two-tailed test as our alternative hypothesis says µ = 20. Look up 1% with 5 degrees of freedom for the critical values. The critical values are −4.03 and 4.03.
  • 24. T-test - Example 4 Sample mean ¯x = 18. Sample standard deviation s2 = x2 − n¯x2 n − 1 = 7.6 s = 2.757 Test statistic T = ¯x − A s/ √ n = 18 − 20 2.757/ √ 6 = −1.78 Decision: −4.03 < −1.78 < 4.03 so we accept the null hypothesis. Conclusion: The sample of 6 bags of maltesers does not provide sufficient evidence at a 1% significance level to reject the chocolate company’s claim; there is an average of 18 maltesers per bag.