SlideShare une entreprise Scribd logo
1  sur  14
The t test
prepared by
B.saikiran
(12NA1E0036)
1
Introduction





The t-test is a basic test that is limited to two
groups. For multiple groups, you would have to
compare each pair of groups, for example with
three groups there would be three tests (AB,
AC, BC), whilst with seven groups there would
need to be 21 tests.
The basic principle is to test the  null
hypothesis that the means of the two groups
are equal.


The t-test assumes:







It is used when there is random assignment and
only two sets of measurement to compare.
There are two main types of t-test:






A normal distribution (parametric data)
Underlying variances are equal (if not, use Welch's test)

Independent-measures t-test: when samples are not
matched.
Matched-pair t-test: When samples appear in pairs (eg.
before-and-after).

A single-sample t-test compares a sample against
a known figure, for example where measures of a
manufactured item are compared against the
required standard.
Applications
To compare the mean of a sample with
population mean.
 To compare the mean of one sample
with the mean of another independent
sample.
 To compare between the values
(readings) of one sample but in 2
occasions.


4
1.Sample mean and population
mean





The general steps of testing hypothesis must be
followed.
Ho: Sample mean=Population mean.
Degrees of freedom = n - 1

−

X −µ
t =
SE
5
Example
The following data represents hemoglobin values in
gm/dl for 10 patients:
10.5 9

6.5

8

11

7

8.5

9.5

12

7.5

Is the mean value for patients significantly differ
from the mean value of general population
(12 gm/dl) . Evaluate the role of chance.
6
Solution


Mention all steps of testing hypothesis.

8.95 − 12
t=
= −5.352
1.80201
10
Then compare with tabulated value, for 9 df, and 5% level of
significance. It is = 2.262
The calculated value>tabulated value.
Reject Ho and conclude that there is a statistically significant difference
between the mean of sample and population mean, and this
difference is unlikely due to chance.
7
8
2.Two independent samples
The following data represents weight in Kg for 10
males and 12 females.
Males:
80

75

95

55

60

70

75

72

80

65

Females:
60

70

50

85

45

60

80

65

70

62

77

82
9
2.Two independent samples, cont.




Is there a statistically significant difference between
the mean weight of males and females. Let alpha =
0.01
To solve it follow the steps and use this equation.
−

t=

−

X1 − X 2
2

2

(n1 − 1) S1 + (n 2 − 1) S 2 1
1
( + )
n1 + n 2 − 2
n1 n 2
10
Results









Mean1=72.7
Mean2=67.17
Variance1=128.46 Variance2=157.787
Df = n1+n2-2=20
t = 1.074
The tabulated t, 2 sides, for alpha 0.01 is 2.845
Then accept Ho and conclude that there is no
significant difference between the 2 means. This
difference may be due to chance.
P>0.01
11
3.One sample in two occasions



Mention steps of testing hypothesis.
The df here = n – 1.
−

d
t =
sd

n

sd =

d2 −
∑

(∑ d ) 2

n −1

n

12
Example: Blood pressure of 8
patients, before & after treatment
BP before BP after
180
140
200
145
230
150
240
155
170
120
190
130
200
140
165
130
Mean d=465/8=58.125

d
40
55
80
85
50
60
60
35
∑d=465

d2
1600
3025
6400
7225
2500
3600
3600
1225
13
∑d2=29175
Results and conclusion







t=9.387
Tabulated t (df7), with level of significance
0.05, two tails, = 2.36
We reject Ho and conclude that there is
significant difference between BP readings
before and after treatment.
P<0.05.
14

Contenu connexe

Tendances

Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)
Upama Dwivedi
 
One Way Anova
One Way AnovaOne Way Anova
One Way Anova
shoffma5
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
Elkana Rorio
 
{ANOVA} PPT-1.pptx
{ANOVA} PPT-1.pptx{ANOVA} PPT-1.pptx
{ANOVA} PPT-1.pptx
SNEHA AGRAWAL GUPTA
 
Type i and type ii errors
Type i and type ii errorsType i and type ii errors
Type i and type ii errors
p24ssp
 

Tendances (20)

The mann whitney u test
The mann whitney u testThe mann whitney u test
The mann whitney u test
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Non parametric tests
Non parametric testsNon parametric tests
Non parametric tests
 
Analysis of variance anova
Analysis of variance anovaAnalysis of variance anova
Analysis of variance anova
 
Student t test
Student t testStudent t test
Student t test
 
non parametric statistics
non parametric statisticsnon parametric statistics
non parametric statistics
 
Measures of Dispersion
Measures of DispersionMeasures of Dispersion
Measures of Dispersion
 
Parametric Test
Parametric TestParametric Test
Parametric Test
 
Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)
 
One Way Anova
One Way AnovaOne Way Anova
One Way Anova
 
Parametric and nonparametric test
Parametric and nonparametric testParametric and nonparametric test
Parametric and nonparametric test
 
Wilcoxon signed rank test
Wilcoxon signed rank testWilcoxon signed rank test
Wilcoxon signed rank test
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
Correlation
CorrelationCorrelation
Correlation
 
Null hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESISNull hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESIS
 
{ANOVA} PPT-1.pptx
{ANOVA} PPT-1.pptx{ANOVA} PPT-1.pptx
{ANOVA} PPT-1.pptx
 
Type i and type ii errors
Type i and type ii errorsType i and type ii errors
Type i and type ii errors
 
Parametric and non parametric test in biostatistics
Parametric and non parametric test in biostatistics Parametric and non parametric test in biostatistics
Parametric and non parametric test in biostatistics
 
Statistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-TestStatistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-Test
 

En vedette

Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt final
piyushdhaker
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
yogesh ingle
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anova
Qasim Raza
 
Mycobacterium tuberculosis(Microbiology)
Mycobacterium tuberculosis(Microbiology)Mycobacterium tuberculosis(Microbiology)
Mycobacterium tuberculosis(Microbiology)
Caroline Karunya
 

En vedette (10)

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
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
Student t-test
Student t-testStudent t-test
Student t-test
 
Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt final
 
Exploratory Factor Analysis
Exploratory Factor AnalysisExploratory Factor Analysis
Exploratory Factor Analysis
 
A Guide to SPSS Statistics
A Guide to SPSS Statistics A Guide to SPSS Statistics
A Guide to SPSS Statistics
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anova
 
Student's T-Test
Student's T-TestStudent's T-Test
Student's T-Test
 
Mycobacterium tuberculosis(Microbiology)
Mycobacterium tuberculosis(Microbiology)Mycobacterium tuberculosis(Microbiology)
Mycobacterium tuberculosis(Microbiology)
 

Similaire à T test

Two Sample Tests
Two Sample TestsTwo Sample Tests
Two Sample Tests
sanketd1983
 
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docxDataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
theodorelove43763
 

Similaire à T test (20)

The t test
The t testThe t test
The t test
 
Two Sample Tests
Two Sample TestsTwo Sample Tests
Two Sample Tests
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
 
Hypothesis testing for parametric data (1)
Hypothesis testing for parametric data (1)Hypothesis testing for parametric data (1)
Hypothesis testing for parametric data (1)
 
Hypothesis testing for parametric data
Hypothesis testing for parametric dataHypothesis testing for parametric data
Hypothesis testing for parametric data
 
Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
 
Stat5 the t test
Stat5 the t testStat5 the t test
Stat5 the t test
 
Stat5 the t test
Stat5 the t testStat5 the t test
Stat5 the t test
 
Non parametrics tests
Non parametrics testsNon parametrics tests
Non parametrics tests
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Lecture 2 doe
Lecture 2 doeLecture 2 doe
Lecture 2 doe
 
Unit-5.-t-test.ppt
Unit-5.-t-test.pptUnit-5.-t-test.ppt
Unit-5.-t-test.ppt
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
Survival.pptx
Survival.pptxSurvival.pptx
Survival.pptx
 
Lecture-6 (t-test and one way ANOVA.ppt
Lecture-6 (t-test and one way ANOVA.pptLecture-6 (t-test and one way ANOVA.ppt
Lecture-6 (t-test and one way ANOVA.ppt
 
Chapter 6 Ranksumtest
Chapter 6 RanksumtestChapter 6 Ranksumtest
Chapter 6 Ranksumtest
 
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docxDataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
DataIDSalaryCompaMidpoint AgePerformance RatingServiceGenderRaiseD.docx
 
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-testHypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
 
Hmisiri nonparametrics book
Hmisiri nonparametrics bookHmisiri nonparametrics book
Hmisiri nonparametrics book
 
non para.doc
non para.docnon para.doc
non para.doc
 

Plus de sai precious (20)

foreign manufacturing stratagies
foreign manufacturing stratagiesforeign manufacturing stratagies
foreign manufacturing stratagies
 
Exim bank opportunities
Exim bank opportunitiesExim bank opportunities
Exim bank opportunities
 
dis investment policy
dis investment policydis investment policy
dis investment policy
 
dis invest ment & pay back period
dis invest ment & pay back perioddis invest ment & pay back period
dis invest ment & pay back period
 
theories of selling
theories of sellingtheories of selling
theories of selling
 
supply chain mgmt
supply chain mgmtsupply chain mgmt
supply chain mgmt
 
foreingn exchange market
foreingn exchange marketforeingn exchange market
foreingn exchange market
 
capital market recent innovations
capital market recent innovationscapital market recent innovations
capital market recent innovations
 
Branding
BrandingBranding
Branding
 
C.r.m & e --c.r.m
C.r.m & e --c.r.mC.r.m & e --c.r.m
C.r.m & e --c.r.m
 
Company analysis
Company analysisCompany analysis
Company analysis
 
Global marketing
Global marketingGlobal marketing
Global marketing
 
I.d.b.i & g.i.c
I.d.b.i & g.i.c I.d.b.i & g.i.c
I.d.b.i & g.i.c
 
Marginal costing & concepts
Marginal costing & conceptsMarginal costing & concepts
Marginal costing & concepts
 
Marginal costing
Marginal costingMarginal costing
Marginal costing
 
Negotiable instruments act 1881
Negotiable instruments act 1881Negotiable instruments act 1881
Negotiable instruments act 1881
 
Negotiable instruments act
Negotiable instruments actNegotiable instruments act
Negotiable instruments act
 
Physical evidence of services
Physical evidence of servicesPhysical evidence of services
Physical evidence of services
 
Risk types
Risk  typesRisk  types
Risk types
 
Stratagic evolution & control
Stratagic evolution & controlStratagic evolution & control
Stratagic evolution & control
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

T test

  • 1. The t test prepared by B.saikiran (12NA1E0036) 1
  • 2. Introduction   The t-test is a basic test that is limited to two groups. For multiple groups, you would have to compare each pair of groups, for example with three groups there would be three tests (AB, AC, BC), whilst with seven groups there would need to be 21 tests. The basic principle is to test the  null hypothesis that the means of the two groups are equal.
  • 3.  The t-test assumes:     It is used when there is random assignment and only two sets of measurement to compare. There are two main types of t-test:    A normal distribution (parametric data) Underlying variances are equal (if not, use Welch's test) Independent-measures t-test: when samples are not matched. Matched-pair t-test: When samples appear in pairs (eg. before-and-after). A single-sample t-test compares a sample against a known figure, for example where measures of a manufactured item are compared against the required standard.
  • 4. Applications To compare the mean of a sample with population mean.  To compare the mean of one sample with the mean of another independent sample.  To compare between the values (readings) of one sample but in 2 occasions.  4
  • 5. 1.Sample mean and population mean    The general steps of testing hypothesis must be followed. Ho: Sample mean=Population mean. Degrees of freedom = n - 1 − X −µ t = SE 5
  • 6. Example The following data represents hemoglobin values in gm/dl for 10 patients: 10.5 9 6.5 8 11 7 8.5 9.5 12 7.5 Is the mean value for patients significantly differ from the mean value of general population (12 gm/dl) . Evaluate the role of chance. 6
  • 7. Solution  Mention all steps of testing hypothesis. 8.95 − 12 t= = −5.352 1.80201 10 Then compare with tabulated value, for 9 df, and 5% level of significance. It is = 2.262 The calculated value>tabulated value. Reject Ho and conclude that there is a statistically significant difference between the mean of sample and population mean, and this difference is unlikely due to chance. 7
  • 8. 8
  • 9. 2.Two independent samples The following data represents weight in Kg for 10 males and 12 females. Males: 80 75 95 55 60 70 75 72 80 65 Females: 60 70 50 85 45 60 80 65 70 62 77 82 9
  • 10. 2.Two independent samples, cont.   Is there a statistically significant difference between the mean weight of males and females. Let alpha = 0.01 To solve it follow the steps and use this equation. − t= − X1 − X 2 2 2 (n1 − 1) S1 + (n 2 − 1) S 2 1 1 ( + ) n1 + n 2 − 2 n1 n 2 10
  • 11. Results        Mean1=72.7 Mean2=67.17 Variance1=128.46 Variance2=157.787 Df = n1+n2-2=20 t = 1.074 The tabulated t, 2 sides, for alpha 0.01 is 2.845 Then accept Ho and conclude that there is no significant difference between the 2 means. This difference may be due to chance. P>0.01 11
  • 12. 3.One sample in two occasions   Mention steps of testing hypothesis. The df here = n – 1. − d t = sd n sd = d2 − ∑ (∑ d ) 2 n −1 n 12
  • 13. Example: Blood pressure of 8 patients, before & after treatment BP before BP after 180 140 200 145 230 150 240 155 170 120 190 130 200 140 165 130 Mean d=465/8=58.125 d 40 55 80 85 50 60 60 35 ∑d=465 d2 1600 3025 6400 7225 2500 3600 3600 1225 13 ∑d2=29175
  • 14. Results and conclusion     t=9.387 Tabulated t (df7), with level of significance 0.05, two tails, = 2.36 We reject Ho and conclude that there is significant difference between BP readings before and after treatment. P<0.05. 14