SlideShare une entreprise Scribd logo
1  sur  36
Inferential Statistics
Quantitative Data
Single Sample and 2 Groups
Dhritiman Chakrabarti
Assistant Professor,
Dept of Neuroanaesthesiology
and Neurocritical Care,
NIMHANS, Bangalore
Probability
• Definition: The chance of any event occuring.
• Probability Density Function (PDF): The chance of
occurrence of a single random value within a range of
continuous values.
• Cumulative distribution function (CDF): The chance
of a single random value being less than a certain
value within a given sample space – Here the CDF is
for value of t-statistic.
Normal Distribution
• Standard Normal Dist – Based on infinite samples. Unimodal with
symmetrical tails – Mean = 0, SD = 1 – Hypothetical – Does not
exist – Used as PDF for Z-test.
• Normal Distribution – Unimodal with symmetrical tails with
Mean=Median=Mode, Skewness is (-3 to +3) and Kurtosis is (-1 to
+1). Can be converted to Std Normal by computation of Z-scores
and plotting the z-score frequency distribution. Z= (x-µ)/SD.
Property of Normal Distribution
• 68% of samples will lie within 1 SD from mean; 95%
will lie within 2 SD of mean; 99.7% will lie within 3 SD
of mean.
T-test
• Single sample T-test – Testing sample mean against
a known value.
• Independent samples T-test – Testing sample 1
mean against sample 2 mean.
• Paired T-test – Testing sample 1 mean before
against sample 1 mean after.
• Based on T-distribution – Similar to Normal
distribution but with lower peak and fatter tails.
Hypothesis testing using Normal/t-
Distributions
• Using Confidence Intervals –
Qualitative.
• Using CDF – Gives actual Probability -
Quantitative
Hypothesis testing using CDF
• First we try to summarize the “effect” – that is the
actual effect of our sample relative to the random
error that might have crept in – Here, it is the t-
statistic.
• The CDF for t-test basically tells us about the
probability of t-statistic of our study being less than
a certain value of t, given a specific “degree of
freedom”.
• For T-distribution, The PDF changes with increasing
sample size (increased degree of freedom). Thus the
CDF also changes.
Central Limit theorem
• The central limit theorem states that, as the sample size
increases, the shape of the sampling distribution approaches
normal shape. For n = 30, the shape of that distribution is
'almost' normal.
• Some researchers say, parametric methods may be used even in
non-normal data if sample size is large enough.
T-test
Assumptions:
1. Data are on a numerical scale
2. The distribution of the underlying population is
normal – Shapiro Wilk/Kolmogrov Smirnov
3. The samples have the same variance ('homogeneity of
variances') – Levene’s test – If variances are not
similar, Welch T-test is used to accommodate for
this.
4. Observations within a group are independent
5. The samples are randomly drawn from the population
• Null hypothesis - that there is no difference
between two means.
• Developed by - W.L. Gosset, and published under the
pseudonym Student.
T-test Formula
T-test
• Involves calculation of T-statistic from difference of
means and the SE. – Basically encapsulated the
difference relative to SE.
• Look up the T-statistic on probability distribution
table based on degrees of freedom (sample space for
the CDF).
• Basically it looks at the probability of one sample
mean belonging to population of the other mean.
• The fatter tails of the T-distribution at lower
dF/sample sizes basically increases the distance of
rejection area from the sample mean and thus makes
the probability testing stricter, to account for larger
SDs in smaller samples.
Parametric and Non-parametric Tests
• Parametric tests are based on the assumption of almost normal
distribution of data within the groups – The probability
distribution tables for estimation of p-values are based on this
assumption.
• Parametric tests are based on estimation of statistic based on
actual values of variables – mean, SD.
• Thus if not normally distributed, erroneous p-values may be
computed.
• Non-parametric tests are based on Ranks of data within the set
– Hence not affect by extreme values/non normality of data
distribution/ordinal scale data.
• Parametric tests are usually more powerful than Non-parametric
if normality assumption is maintained– in the sense that Beta
error is low.
• If normality is not maintained, Non-parametric tests become
more powerful.
T-table
Independent Samples T-test on
SPSS• Necessities:
1. Your grouping variable should be coded numerically, 1/0; 1/2
etc. You may label the values appropriately in the “Variable
view”
2. Your dependent variable of interest should be in a separate
column.
Checking for Normality
• Qualitative: Histogram; QQ Plot
• Quantitative: Shapiro-wilk test.
• Here you need to see normality within each group  So you need
to conduct separate tests of normality for each group
simultaneously  So split the file.
• Go to Data  Split File.
• Put the grouping variable in “Organize output by groups”  click
Ok.
• Next go to Analyze  Descriptive Statistics 
Explore.
• Put variables of interest in “Dependent List”  Click
“Plots” tab  Check “Normality plots with tests” and
“Histogram”  Continue  Ok.
Normality Output
Tells you about any missing
Cases.
Both groups
normality
assumption should
be satisfied.
Statistical test of
Normality. If P-value is >
0.05/0.01, then Normal,
otherwise not Normal.
Weight  Normal
Height  Not Normal
Independent Samples T-test
• Although normality assumption was violated, just as an example,
we’ll conduct both parametric and non parametric tests on this
data.
• First Unsplit the file. Go to Data  Split File  Check “Analyze
all cases..”
• Go to Analyze  “Compare Means”  “Independent Samples t-
test”.
• Select the variables of interest and transfer to “Test Variables”
window. Transfer Grouping variable and Specify the groups –
Here 1/2. Click continue  Ok.
Output
Descriptives – Self
Explanatory
If Levene’s test p > 0.05, go for equal variances assumed, else equal variances not
assumed
P-value of t-testT-statistic Degree of
freedom
Mann Whitney U-Test
• If you want to go for non parametric test instead,
• Go to Analyze  Nonparametric tests  -
Independent samples.
• Same procedure as t-test – Place test variable and
grouping variable.
P.S. It is also called Wilcoxon Rank Sum test.
Output
Just tells about mean rank and sum of
ranks.
Not important for us.
P-value for difference between groups.
Note this does not provide the descriptives. Take descriptives using
procedure described before – Median and Interquartile range important for
Non-parametric tests.
T-test on Graphpad
• Keep data ready in Excel  Needs to be copy pasted in
Graphpad
• Open Graphpad.
• Select “Columns” from tabs on the left.
• Click the “Enter replicate values…” option as shown in pic 
Create
• Create separate columns for group-variable as shown in pic and
paste the values from Excel.
• Click Analyze button.
• Click “Column statistics”
• Select the two columns for comparison and click Ok.
• Select all the descriptives you want.
• Select Shapiro-Wilk test.
• Click Ok.
• Now we know normality of the group variables. And descriptives.
• Click Analyze button.
• Click “t-tests (and…”
• Select the two columns for comparison and click Ok.
• Click the appropriate – parametric or nonparametric
test.
• If using t-test, better go for Welch’s correction.
• Click OK.
T-test
Mean diff stats
Levene’s test
Output
Paired t-test on SPSS
• Used to test difference of means for a
variable in matched groups or same
samples at different time points.
• Data of the variable should be in 2
columns.
• Normality assumption has to be
satisfied for both variables – since
same samples are being used, no
splitting required – directly do Shapiro
Wilk on the two variables.
• Take out the descriptives of the two
variables as described before.
• Then Analyze  Compare Means 
Paired Samples T-test.
• Insert the before and after variables as pairs
as shown  Click OK.
Output
Mean and SD of difference P-value
Wilcoxon Signed Rank Test
• Non Parametric equivalent of Paired t-test.
• Analyze  Nonparametric tests  2-Related samples
• Fill test pairs same as paired t-test  OK
Output
Just tells about mean rank
and sum of ranks.
Not important for us.
P-value for difference
between the variables.
Note this does not provide the descriptives. Take descriptives using
procedure described before – Median and Interquartile range important for
Non-parametric tests.
On Graphpad
• Enter column data as previously described.
• Analyze  T-test  Check the required variables 
OK  Click “Paired” and parametric/non parametric
as required.
Paired T-test
Mean diff stats
Correlation Stats
Output
Single Sample T-test on SPSS
• Used to test difference of Sample mean from that of an another known
mean. In Data View - Variable in a single column.
• Test for normality – for parametric vs non parametric.
• For parametric, Go to Analyze  Compare Means  One Sample t-test.
• Suppose we want to see whether the sample mean is different from
population average of 65 kg  Insert test variable and enter the “Test
Value” as 65  OK.
Sample Descriptives
P-value of difference
Note: Non parametric 1-sample Wilcoxon is not available in SPSS 17.
On Graphpad
• Create separate column for
variable by pasting the values from
Excel.
• Click Analyze button.
• Click “Column statistics”
• Select the column for comparison
and click Ok.
• Click the required descriptives,
Normality test and both the one-
sample tests under “Inferences”.
• Enter Hypothetical value and click
OK.
Number of values 30
Minimum 63.00
25% Percentile 69.50
Median 73.50
75% Percentile 81.50
Maximum 90.00
Mean 75.23
Std. Deviation 7.899
Std. Error of Mean 1.442
Lower 95% CI of mean 72.28
Upper 95% CI of mean 78.18
Shapiro-Wilk normality test
W 0.9550
P value 0.2290
Passed normality test (alpha=0.05)? Yes
P value summary ns
One sample t test
Theoretical mean 65.00
Actual mean 75.23
Discrepancy -10.23
95% CI of discrepancy 7.284 to 13.18
t, df t=7.096 df=29
P value (two tailed) < 0.0001
Significant (alpha=0.05)? Yes
Wilcoxon Signed Rank Test
Theoretical median 65.00
Actual median 73.50
Discrepancy -8.500
Sum of signed ranks (W) 421.0
Sum of positive ranks 428.0
Sum of negative ranks -7.000
P value (two tailed) < 0.0001
Exact or estimate? Exact
Significant (alpha=0.05)? Yes
Sum 2257
Descriptives
Normality test
One-Sample t-test
One-Sample Wilcoxon Signed Rank test
Output

Contenu connexe

Tendances

2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx
2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx
2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptxCharizaPitogo2
 
Quantitative And Qualitative Research
Quantitative And Qualitative ResearchQuantitative And Qualitative Research
Quantitative And Qualitative Researchdoha07
 
Research Variable and Research objective
Research Variable and Research objectiveResearch Variable and Research objective
Research Variable and Research objectiveRAVI RAI DANGI
 
Types of Statistics
Types of StatisticsTypes of Statistics
Types of Statisticsloranel
 
How to write your dissertation data analysis chapters.
How to write your dissertation data analysis chapters.How to write your dissertation data analysis chapters.
How to write your dissertation data analysis chapters.The Free School
 
Research Designs and Research methods
Research Designs and Research methods Research Designs and Research methods
Research Designs and Research methods jagannath Dange
 
Research and Theory
Research and TheoryResearch and Theory
Research and TheorySundar B N
 
Parametric vs non parametric test
Parametric vs non parametric testParametric vs non parametric test
Parametric vs non parametric testar9530
 
Qualitative and quantitative methods of research
Qualitative and quantitative methods of researchQualitative and quantitative methods of research
Qualitative and quantitative methods of researchJordan Cruz
 
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNS
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNSINTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNS
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNSMAHESWARI JAIKUMAR
 
Internal and external validity factors
Internal and external validity factorsInternal and external validity factors
Internal and external validity factorsAmir Mahmoud
 
Qualitative Research Method
 Qualitative Research  Method  Qualitative Research  Method
Qualitative Research Method Kunal Modak
 
Levels of measurement
Levels of measurementLevels of measurement
Levels of measurementSarfraz Ahmad
 

Tendances (20)

2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx
2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx
2-QUALITATIVE-RESEARCH-AND-ITS-IMPORTANCE.pptx
 
Quantitative And Qualitative Research
Quantitative And Qualitative ResearchQuantitative And Qualitative Research
Quantitative And Qualitative Research
 
Research Variable and Research objective
Research Variable and Research objectiveResearch Variable and Research objective
Research Variable and Research objective
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Types of Statistics
Types of StatisticsTypes of Statistics
Types of Statistics
 
Effect Size
Effect SizeEffect Size
Effect Size
 
Analysis and Interpretation of Data
Analysis and Interpretation of DataAnalysis and Interpretation of Data
Analysis and Interpretation of Data
 
How to write your dissertation data analysis chapters.
How to write your dissertation data analysis chapters.How to write your dissertation data analysis chapters.
How to write your dissertation data analysis chapters.
 
Research Designs and Research methods
Research Designs and Research methods Research Designs and Research methods
Research Designs and Research methods
 
Research and Theory
Research and TheoryResearch and Theory
Research and Theory
 
Parametric vs non parametric test
Parametric vs non parametric testParametric vs non parametric test
Parametric vs non parametric test
 
Qualitative and quantitative methods of research
Qualitative and quantitative methods of researchQualitative and quantitative methods of research
Qualitative and quantitative methods of research
 
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNS
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNSINTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNS
INTO & TYPES OF NON EXPERIMENTAL RESEARCH DESIGNS
 
Manova
ManovaManova
Manova
 
Internal and external validity factors
Internal and external validity factorsInternal and external validity factors
Internal and external validity factors
 
Qualitative Research Method
 Qualitative Research  Method  Qualitative Research  Method
Qualitative Research Method
 
Quantitative Data analysis
Quantitative Data analysisQuantitative Data analysis
Quantitative Data analysis
 
Unit 1 - Statistics (Part 1).pptx
Unit 1 - Statistics (Part 1).pptxUnit 1 - Statistics (Part 1).pptx
Unit 1 - Statistics (Part 1).pptx
 
Levels of measurement
Levels of measurementLevels of measurement
Levels of measurement
 
8.1
8.18.1
8.1
 

Similaire à Inferential statistics quantitative data - single sample and 2 groups

T test^jsample size^j ethics
T test^jsample size^j ethicsT test^jsample size^j ethics
T test^jsample size^j ethicsAbhishek Thakur
 
non parametric test.pptx
non parametric test.pptxnon parametric test.pptx
non parametric test.pptxSoujanyaLk1
 
Non parametric test
Non parametric testNon parametric test
Non parametric testNeetathakur3
 
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss Subodh Khanal
 
Summary of statistical tools used in spss
Summary of statistical tools used in spssSummary of statistical tools used in spss
Summary of statistical tools used in spssSubodh Khanal
 
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgjhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgUMAIRASHFAQ20
 
1. complete stats notes
1. complete stats notes1. complete stats notes
1. complete stats notesBob Smullen
 
Testing of hypothesis.pptx
Testing of hypothesis.pptxTesting of hypothesis.pptx
Testing of hypothesis.pptxSyedaKumail
 
Basics of statistics
Basics of statisticsBasics of statistics
Basics of statisticsdonthuraj
 
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 anovaQasim Raza
 
One Sample t test.pptx
One Sample t test.pptxOne Sample t test.pptx
One Sample t test.pptxletbestrong
 
Some statistical concepts relevant to proteomics data analysis
Some statistical concepts relevant to proteomics data analysisSome statistical concepts relevant to proteomics data analysis
Some statistical concepts relevant to proteomics data analysisUC Davis
 
Independent t-test.pptx
Independent t-test.pptxIndependent t-test.pptx
Independent t-test.pptxMarielSaude
 
Stats-Review-Maie-St-John-5-20-2009.ppt
Stats-Review-Maie-St-John-5-20-2009.pptStats-Review-Maie-St-John-5-20-2009.ppt
Stats-Review-Maie-St-John-5-20-2009.pptDiptoKumerSarker1
 

Similaire à Inferential statistics quantitative data - single sample and 2 groups (20)

T test^jsample size^j ethics
T test^jsample size^j ethicsT test^jsample size^j ethics
T test^jsample size^j ethics
 
non parametric test.pptx
non parametric test.pptxnon parametric test.pptx
non parametric test.pptx
 
Non parametric test
Non parametric testNon parametric test
Non parametric test
 
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss
 
Summary of statistical tools used in spss
Summary of statistical tools used in spssSummary of statistical tools used in spss
Summary of statistical tools used in spss
 
Environmental statistics
Environmental statisticsEnvironmental statistics
Environmental statistics
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
 
Non parametric-tests
Non parametric-testsNon parametric-tests
Non parametric-tests
 
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgjhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
 
1. complete stats notes
1. complete stats notes1. complete stats notes
1. complete stats notes
 
Testing of hypothesis.pptx
Testing of hypothesis.pptxTesting of hypothesis.pptx
Testing of hypothesis.pptx
 
Basics of statistics
Basics of statisticsBasics of statistics
Basics of statistics
 
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
 
Presentation 7.pptx
Presentation 7.pptxPresentation 7.pptx
Presentation 7.pptx
 
One Sample t test.pptx
One Sample t test.pptxOne Sample t test.pptx
One Sample t test.pptx
 
Some statistical concepts relevant to proteomics data analysis
Some statistical concepts relevant to proteomics data analysisSome statistical concepts relevant to proteomics data analysis
Some statistical concepts relevant to proteomics data analysis
 
Independent t-test.pptx
Independent t-test.pptxIndependent t-test.pptx
Independent t-test.pptx
 
Stats-Review-Maie-St-John-5-20-2009.ppt
Stats-Review-Maie-St-John-5-20-2009.pptStats-Review-Maie-St-John-5-20-2009.ppt
Stats-Review-Maie-St-John-5-20-2009.ppt
 
Student t test
Student t testStudent t test
Student t test
 
Statistics
StatisticsStatistics
Statistics
 

Plus de Dhritiman Chakrabarti

Inferential statistics quantitative data - anova
Inferential statistics   quantitative data - anovaInferential statistics   quantitative data - anova
Inferential statistics quantitative data - anovaDhritiman Chakrabarti
 
Types of variables and descriptive statistics
Types of variables and descriptive statisticsTypes of variables and descriptive statistics
Types of variables and descriptive statisticsDhritiman Chakrabarti
 
Study designs, randomization, bias errors, power, p-value, sample size
Study designs, randomization, bias errors, power, p-value, sample sizeStudy designs, randomization, bias errors, power, p-value, sample size
Study designs, randomization, bias errors, power, p-value, sample sizeDhritiman Chakrabarti
 
Anaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgeryAnaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgeryDhritiman Chakrabarti
 
Caeserean section complicated by mitral stenosis
Caeserean section complicated by mitral stenosisCaeserean section complicated by mitral stenosis
Caeserean section complicated by mitral stenosisDhritiman Chakrabarti
 
Bronchial blockers & endobronchial tubes
Bronchial blockers & endobronchial tubesBronchial blockers & endobronchial tubes
Bronchial blockers & endobronchial tubesDhritiman Chakrabarti
 
Bougie, trachlite , laryngeal tube , combitube , i gel ,truview
Bougie, trachlite , laryngeal tube , combitube , i gel ,truviewBougie, trachlite , laryngeal tube , combitube , i gel ,truview
Bougie, trachlite , laryngeal tube , combitube , i gel ,truviewDhritiman Chakrabarti
 

Plus de Dhritiman Chakrabarti (20)

For crossover designs
For crossover designsFor crossover designs
For crossover designs
 
Logistic regression analysis
Logistic regression analysisLogistic regression analysis
Logistic regression analysis
 
Agreement analysis
Agreement analysisAgreement analysis
Agreement analysis
 
Linear regression analysis
Linear regression analysisLinear regression analysis
Linear regression analysis
 
Inferential statistics correlations
Inferential statistics correlationsInferential statistics correlations
Inferential statistics correlations
 
Inferential statistics nominal data
Inferential statistics   nominal dataInferential statistics   nominal data
Inferential statistics nominal data
 
Inferential statistics quantitative data - anova
Inferential statistics   quantitative data - anovaInferential statistics   quantitative data - anova
Inferential statistics quantitative data - anova
 
Types of variables and descriptive statistics
Types of variables and descriptive statisticsTypes of variables and descriptive statistics
Types of variables and descriptive statistics
 
Data entry in Excel and SPSS
Data entry in Excel and SPSS Data entry in Excel and SPSS
Data entry in Excel and SPSS
 
Study designs, randomization, bias errors, power, p-value, sample size
Study designs, randomization, bias errors, power, p-value, sample sizeStudy designs, randomization, bias errors, power, p-value, sample size
Study designs, randomization, bias errors, power, p-value, sample size
 
Anaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgeryAnaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgery
 
Epilepsy and anaesthesia
Epilepsy and anaesthesiaEpilepsy and anaesthesia
Epilepsy and anaesthesia
 
Icp monitoring seminar
Icp monitoring seminarIcp monitoring seminar
Icp monitoring seminar
 
Caeserean section complicated by mitral stenosis
Caeserean section complicated by mitral stenosisCaeserean section complicated by mitral stenosis
Caeserean section complicated by mitral stenosis
 
Bronchospasm during induction
Bronchospasm during inductionBronchospasm during induction
Bronchospasm during induction
 
Bronchial blockers & endobronchial tubes
Bronchial blockers & endobronchial tubesBronchial blockers & endobronchial tubes
Bronchial blockers & endobronchial tubes
 
Breathing systems
Breathing systemsBreathing systems
Breathing systems
 
Brachial plexus block
Brachial plexus blockBrachial plexus block
Brachial plexus block
 
Bph
BphBph
Bph
 
Bougie, trachlite , laryngeal tube , combitube , i gel ,truview
Bougie, trachlite , laryngeal tube , combitube , i gel ,truviewBougie, trachlite , laryngeal tube , combitube , i gel ,truview
Bougie, trachlite , laryngeal tube , combitube , i gel ,truview
 

Dernier

RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxaleedritatuxx
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxellehsormae
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGIThomas Poetter
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Boston Institute of Analytics
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 

Dernier (20)

RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptx
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGILLMs, LMMs, their Improvement Suggestions and the Path towards AGI
LLMs, LMMs, their Improvement Suggestions and the Path towards AGI
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 

Inferential statistics quantitative data - single sample and 2 groups

  • 1. Inferential Statistics Quantitative Data Single Sample and 2 Groups Dhritiman Chakrabarti Assistant Professor, Dept of Neuroanaesthesiology and Neurocritical Care, NIMHANS, Bangalore
  • 2. Probability • Definition: The chance of any event occuring. • Probability Density Function (PDF): The chance of occurrence of a single random value within a range of continuous values. • Cumulative distribution function (CDF): The chance of a single random value being less than a certain value within a given sample space – Here the CDF is for value of t-statistic.
  • 3. Normal Distribution • Standard Normal Dist – Based on infinite samples. Unimodal with symmetrical tails – Mean = 0, SD = 1 – Hypothetical – Does not exist – Used as PDF for Z-test. • Normal Distribution – Unimodal with symmetrical tails with Mean=Median=Mode, Skewness is (-3 to +3) and Kurtosis is (-1 to +1). Can be converted to Std Normal by computation of Z-scores and plotting the z-score frequency distribution. Z= (x-µ)/SD.
  • 4. Property of Normal Distribution • 68% of samples will lie within 1 SD from mean; 95% will lie within 2 SD of mean; 99.7% will lie within 3 SD of mean.
  • 5. T-test • Single sample T-test – Testing sample mean against a known value. • Independent samples T-test – Testing sample 1 mean against sample 2 mean. • Paired T-test – Testing sample 1 mean before against sample 1 mean after. • Based on T-distribution – Similar to Normal distribution but with lower peak and fatter tails.
  • 6. Hypothesis testing using Normal/t- Distributions • Using Confidence Intervals – Qualitative. • Using CDF – Gives actual Probability - Quantitative
  • 7. Hypothesis testing using CDF • First we try to summarize the “effect” – that is the actual effect of our sample relative to the random error that might have crept in – Here, it is the t- statistic. • The CDF for t-test basically tells us about the probability of t-statistic of our study being less than a certain value of t, given a specific “degree of freedom”. • For T-distribution, The PDF changes with increasing sample size (increased degree of freedom). Thus the CDF also changes.
  • 8. Central Limit theorem • The central limit theorem states that, as the sample size increases, the shape of the sampling distribution approaches normal shape. For n = 30, the shape of that distribution is 'almost' normal. • Some researchers say, parametric methods may be used even in non-normal data if sample size is large enough.
  • 9. T-test Assumptions: 1. Data are on a numerical scale 2. The distribution of the underlying population is normal – Shapiro Wilk/Kolmogrov Smirnov 3. The samples have the same variance ('homogeneity of variances') – Levene’s test – If variances are not similar, Welch T-test is used to accommodate for this. 4. Observations within a group are independent 5. The samples are randomly drawn from the population • Null hypothesis - that there is no difference between two means. • Developed by - W.L. Gosset, and published under the pseudonym Student.
  • 11. T-test • Involves calculation of T-statistic from difference of means and the SE. – Basically encapsulated the difference relative to SE. • Look up the T-statistic on probability distribution table based on degrees of freedom (sample space for the CDF). • Basically it looks at the probability of one sample mean belonging to population of the other mean. • The fatter tails of the T-distribution at lower dF/sample sizes basically increases the distance of rejection area from the sample mean and thus makes the probability testing stricter, to account for larger SDs in smaller samples.
  • 12. Parametric and Non-parametric Tests • Parametric tests are based on the assumption of almost normal distribution of data within the groups – The probability distribution tables for estimation of p-values are based on this assumption. • Parametric tests are based on estimation of statistic based on actual values of variables – mean, SD. • Thus if not normally distributed, erroneous p-values may be computed. • Non-parametric tests are based on Ranks of data within the set – Hence not affect by extreme values/non normality of data distribution/ordinal scale data. • Parametric tests are usually more powerful than Non-parametric if normality assumption is maintained– in the sense that Beta error is low. • If normality is not maintained, Non-parametric tests become more powerful.
  • 14. Independent Samples T-test on SPSS• Necessities: 1. Your grouping variable should be coded numerically, 1/0; 1/2 etc. You may label the values appropriately in the “Variable view” 2. Your dependent variable of interest should be in a separate column.
  • 15. Checking for Normality • Qualitative: Histogram; QQ Plot • Quantitative: Shapiro-wilk test. • Here you need to see normality within each group  So you need to conduct separate tests of normality for each group simultaneously  So split the file. • Go to Data  Split File. • Put the grouping variable in “Organize output by groups”  click Ok.
  • 16. • Next go to Analyze  Descriptive Statistics  Explore. • Put variables of interest in “Dependent List”  Click “Plots” tab  Check “Normality plots with tests” and “Histogram”  Continue  Ok.
  • 17. Normality Output Tells you about any missing Cases. Both groups normality assumption should be satisfied. Statistical test of Normality. If P-value is > 0.05/0.01, then Normal, otherwise not Normal. Weight  Normal Height  Not Normal
  • 18. Independent Samples T-test • Although normality assumption was violated, just as an example, we’ll conduct both parametric and non parametric tests on this data. • First Unsplit the file. Go to Data  Split File  Check “Analyze all cases..” • Go to Analyze  “Compare Means”  “Independent Samples t- test”. • Select the variables of interest and transfer to “Test Variables” window. Transfer Grouping variable and Specify the groups – Here 1/2. Click continue  Ok.
  • 19. Output Descriptives – Self Explanatory If Levene’s test p > 0.05, go for equal variances assumed, else equal variances not assumed P-value of t-testT-statistic Degree of freedom
  • 20. Mann Whitney U-Test • If you want to go for non parametric test instead, • Go to Analyze  Nonparametric tests  - Independent samples. • Same procedure as t-test – Place test variable and grouping variable. P.S. It is also called Wilcoxon Rank Sum test.
  • 21. Output Just tells about mean rank and sum of ranks. Not important for us. P-value for difference between groups. Note this does not provide the descriptives. Take descriptives using procedure described before – Median and Interquartile range important for Non-parametric tests.
  • 22. T-test on Graphpad • Keep data ready in Excel  Needs to be copy pasted in Graphpad • Open Graphpad. • Select “Columns” from tabs on the left. • Click the “Enter replicate values…” option as shown in pic  Create
  • 23. • Create separate columns for group-variable as shown in pic and paste the values from Excel. • Click Analyze button. • Click “Column statistics” • Select the two columns for comparison and click Ok.
  • 24. • Select all the descriptives you want. • Select Shapiro-Wilk test. • Click Ok.
  • 25.
  • 26. • Now we know normality of the group variables. And descriptives. • Click Analyze button. • Click “t-tests (and…” • Select the two columns for comparison and click Ok.
  • 27. • Click the appropriate – parametric or nonparametric test. • If using t-test, better go for Welch’s correction. • Click OK. T-test Mean diff stats Levene’s test Output
  • 28. Paired t-test on SPSS • Used to test difference of means for a variable in matched groups or same samples at different time points. • Data of the variable should be in 2 columns. • Normality assumption has to be satisfied for both variables – since same samples are being used, no splitting required – directly do Shapiro Wilk on the two variables. • Take out the descriptives of the two variables as described before. • Then Analyze  Compare Means  Paired Samples T-test.
  • 29. • Insert the before and after variables as pairs as shown  Click OK. Output Mean and SD of difference P-value
  • 30. Wilcoxon Signed Rank Test • Non Parametric equivalent of Paired t-test. • Analyze  Nonparametric tests  2-Related samples • Fill test pairs same as paired t-test  OK
  • 31. Output Just tells about mean rank and sum of ranks. Not important for us. P-value for difference between the variables. Note this does not provide the descriptives. Take descriptives using procedure described before – Median and Interquartile range important for Non-parametric tests.
  • 32. On Graphpad • Enter column data as previously described. • Analyze  T-test  Check the required variables  OK  Click “Paired” and parametric/non parametric as required. Paired T-test Mean diff stats Correlation Stats Output
  • 33. Single Sample T-test on SPSS • Used to test difference of Sample mean from that of an another known mean. In Data View - Variable in a single column. • Test for normality – for parametric vs non parametric. • For parametric, Go to Analyze  Compare Means  One Sample t-test. • Suppose we want to see whether the sample mean is different from population average of 65 kg  Insert test variable and enter the “Test Value” as 65  OK.
  • 34. Sample Descriptives P-value of difference Note: Non parametric 1-sample Wilcoxon is not available in SPSS 17.
  • 35. On Graphpad • Create separate column for variable by pasting the values from Excel. • Click Analyze button. • Click “Column statistics” • Select the column for comparison and click Ok. • Click the required descriptives, Normality test and both the one- sample tests under “Inferences”. • Enter Hypothetical value and click OK.
  • 36. Number of values 30 Minimum 63.00 25% Percentile 69.50 Median 73.50 75% Percentile 81.50 Maximum 90.00 Mean 75.23 Std. Deviation 7.899 Std. Error of Mean 1.442 Lower 95% CI of mean 72.28 Upper 95% CI of mean 78.18 Shapiro-Wilk normality test W 0.9550 P value 0.2290 Passed normality test (alpha=0.05)? Yes P value summary ns One sample t test Theoretical mean 65.00 Actual mean 75.23 Discrepancy -10.23 95% CI of discrepancy 7.284 to 13.18 t, df t=7.096 df=29 P value (two tailed) < 0.0001 Significant (alpha=0.05)? Yes Wilcoxon Signed Rank Test Theoretical median 65.00 Actual median 73.50 Discrepancy -8.500 Sum of signed ranks (W) 421.0 Sum of positive ranks 428.0 Sum of negative ranks -7.000 P value (two tailed) < 0.0001 Exact or estimate? Exact Significant (alpha=0.05)? Yes Sum 2257 Descriptives Normality test One-Sample t-test One-Sample Wilcoxon Signed Rank test Output