SlideShare a Scribd company logo
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

More Related Content

What's hot

Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
jasondroesch
 
1.5 Observational vs. Experimental
1.5 Observational vs. Experimental1.5 Observational vs. Experimental
1.5 Observational vs. Experimental
mlong24
 
Measures of Central Tendency
Measures of Central TendencyMeasures of Central Tendency
Measures of Central Tendency
jasondroesch
 
Advance Statistics - Wilcoxon Signed Rank Test
Advance Statistics - Wilcoxon Signed Rank TestAdvance Statistics - Wilcoxon Signed Rank Test
Advance Statistics - Wilcoxon Signed Rank Test
Joshua Batalla
 
Measures of Variability
Measures of VariabilityMeasures of Variability
Measures of Variability
jasondroesch
 
Kruskal Wallis test, Friedman test, Spearman Correlation
Kruskal Wallis test, Friedman test, Spearman CorrelationKruskal Wallis test, Friedman test, Spearman Correlation
Kruskal Wallis test, Friedman test, Spearman Correlation
Rizwan S A
 
Student's T Test
Student's T TestStudent's T Test
Student's T Test
Anthony J. Evans
 
Repeated Measures ANOVA
Repeated Measures ANOVARepeated Measures ANOVA
Repeated Measures ANOVA
Kaori Kubo Germano, PhD
 
Repeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of VarianceRepeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of Variance
jasondroesch
 
Sample determinants and size
Sample determinants and sizeSample determinants and size
Sample determinants and size
Tarek Tawfik Amin
 
Two Means Independent Samples
Two Means Independent Samples  Two Means Independent Samples
Two Means Independent Samples
Long Beach City College
 
7. logistics regression using spss
7. logistics regression using spss7. logistics regression using spss
7. logistics regression using spss
Dr Nisha Arora
 
CORRELATION.pptx
CORRELATION.pptxCORRELATION.pptx
CORRELATION.pptx
SreeLatha98
 
Introduction to the t Statistic
Introduction to the t StatisticIntroduction to the t Statistic
Introduction to the t Statistic
jasondroesch
 
Choosing the Right Statistical Techniques
Choosing the Right Statistical TechniquesChoosing the Right Statistical Techniques
Choosing the Right Statistical Techniques
Bodhiya Wijaya Mulya
 
Epidemological methods
Epidemological methodsEpidemological methods
Epidemological methods
Kundan Singh
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
ewhite00
 
The t Test for Two Independent Samples
The t Test for Two Independent SamplesThe t Test for Two Independent Samples
The t Test for Two Independent Samples
jasondroesch
 
Non parametric methods
Non parametric methodsNon parametric methods
Non parametric methods
Pedro Moreira
 

What's hot (20)

Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
1.5 Observational vs. Experimental
1.5 Observational vs. Experimental1.5 Observational vs. Experimental
1.5 Observational vs. Experimental
 
Measures of Central Tendency
Measures of Central TendencyMeasures of Central Tendency
Measures of Central Tendency
 
Advance Statistics - Wilcoxon Signed Rank Test
Advance Statistics - Wilcoxon Signed Rank TestAdvance Statistics - Wilcoxon Signed Rank Test
Advance Statistics - Wilcoxon Signed Rank Test
 
Measures of Variability
Measures of VariabilityMeasures of Variability
Measures of Variability
 
Kruskal Wallis test, Friedman test, Spearman Correlation
Kruskal Wallis test, Friedman test, Spearman CorrelationKruskal Wallis test, Friedman test, Spearman Correlation
Kruskal Wallis test, Friedman test, Spearman Correlation
 
Student's T Test
Student's T TestStudent's T Test
Student's T Test
 
Repeated Measures ANOVA
Repeated Measures ANOVARepeated Measures ANOVA
Repeated Measures ANOVA
 
Repeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of VarianceRepeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of Variance
 
Sample determinants and size
Sample determinants and sizeSample determinants and size
Sample determinants and size
 
Two Means Independent Samples
Two Means Independent Samples  Two Means Independent Samples
Two Means Independent Samples
 
7. logistics regression using spss
7. logistics regression using spss7. logistics regression using spss
7. logistics regression using spss
 
CORRELATION.pptx
CORRELATION.pptxCORRELATION.pptx
CORRELATION.pptx
 
Introduction to the t Statistic
Introduction to the t StatisticIntroduction to the t Statistic
Introduction to the t Statistic
 
Choosing the Right Statistical Techniques
Choosing the Right Statistical TechniquesChoosing the Right Statistical Techniques
Choosing the Right Statistical Techniques
 
Epidemological methods
Epidemological methodsEpidemological methods
Epidemological methods
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
The t Test for Two Independent Samples
The t Test for Two Independent SamplesThe t Test for Two Independent Samples
The t Test for Two Independent Samples
 
Non parametric methods
Non parametric methodsNon parametric methods
Non parametric methods
 
Multiple regression
Multiple regressionMultiple regression
Multiple regression
 

Similar to 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 ethics
Abhishek Thakur
 
non parametric test.pptx
non parametric test.pptxnon parametric test.pptx
non parametric test.pptx
SoujanyaLk1
 
Non parametric test
Non parametric testNon parametric test
Non parametric test
Neetathakur3
 
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 spss
Subodh Khanal
 
Environmental statistics
Environmental statisticsEnvironmental statistics
Environmental statistics
Georgios Ath. Kounis
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
ShifnaRahman
 
Non parametric-tests
Non parametric-testsNon parametric-tests
Non parametric-tests
Asmita Bhagdikar
 
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgjhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
UMAIRASHFAQ20
 
1. complete stats notes
1. complete stats notes1. complete stats notes
1. complete stats notes
Bob Smullen
 
Testing of hypothesis.pptx
Testing of hypothesis.pptxTesting of hypothesis.pptx
Testing of hypothesis.pptx
SyedaKumail
 
Basics of statistics
Basics of statisticsBasics of statistics
Basics of statistics
donthuraj
 
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
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...
KavyasriPuttamreddy
 
Presentation 7.pptx
Presentation 7.pptxPresentation 7.pptx
Presentation 7.pptx
MuhammadUsman653449
 
One Sample t test.pptx
One Sample t test.pptxOne Sample t test.pptx
One Sample t test.pptx
letbestrong
 
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
UC Davis
 
Independent t-test.pptx
Independent t-test.pptxIndependent t-test.pptx
Independent t-test.pptx
MarielSaude
 
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
DiptoKumerSarker1
 
Student t test
Student t testStudent t test
Student t test
Dr Shovan Padhy, MD
 

Similar to 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
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...
 
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
 

More from Dhritiman Chakrabarti

For crossover designs
For crossover designsFor crossover designs
For crossover designs
Dhritiman Chakrabarti
 
Logistic regression analysis
Logistic regression analysisLogistic regression analysis
Logistic regression analysis
Dhritiman Chakrabarti
 
Linear regression analysis
Linear regression analysisLinear regression analysis
Linear regression analysis
Dhritiman Chakrabarti
 
Inferential statistics correlations
Inferential statistics correlationsInferential statistics correlations
Inferential statistics correlations
Dhritiman Chakrabarti
 
Inferential statistics nominal data
Inferential statistics   nominal dataInferential statistics   nominal data
Inferential statistics nominal data
Dhritiman Chakrabarti
 
Inferential statistics quantitative data - anova
Inferential statistics   quantitative data - anovaInferential statistics   quantitative data - anova
Inferential statistics quantitative data - anova
Dhritiman Chakrabarti
 
Types of variables and descriptive statistics
Types of variables and descriptive statisticsTypes of variables and descriptive statistics
Types of variables and descriptive statistics
Dhritiman Chakrabarti
 
Data entry in Excel and SPSS
Data entry in Excel and SPSS Data entry in Excel and SPSS
Data entry in Excel and SPSS
Dhritiman 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 size
Dhritiman Chakrabarti
 
Anaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgeryAnaesthesia for functional neurosurgery
Anaesthesia for functional neurosurgery
Dhritiman Chakrabarti
 
Epilepsy and anaesthesia
Epilepsy and anaesthesiaEpilepsy and anaesthesia
Epilepsy and anaesthesia
Dhritiman Chakrabarti
 
Icp monitoring seminar
Icp monitoring seminarIcp monitoring seminar
Icp monitoring seminar
Dhritiman 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
 

More from 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
 
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
 
Blood transfusion
Blood transfusionBlood transfusion
Blood transfusion
 

Recently uploaded

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 

Recently uploaded (20)

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 

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