SlideShare a Scribd company logo
1 of 21
Download to read offline
Department of Management Information Systems
FINAL REPORT
Hypothesis Tests in R Programming
Atacan Garip
1303041042
Ankara
2017
Table of Contents
Parametric or Nonparametric ................................................................................................................. 3
Scale of measurement......................................................................................................................... 3
The population distribution................................................................................................................. 3
Parametric........................................................................................................................................... 3
Non-Parametric................................................................................................................................... 3
Parametric Tests...................................................................................................................................... 4
T-Test................................................................................................................................................... 4
ANOVA and Post Hoc........................................................................................................................... 7
Non-Parametric Tests............................................................................................................................ 10
Chi-Square ......................................................................................................................................... 10
Mann-Whitney U and Wilcoxon Test ................................................................................................ 12
Kruskal Wallis Test............................................................................................................................. 14
Correlation............................................................................................................................................. 16
Correlation......................................................................................................................................... 16
Regression ............................................................................................................................................. 19
Simple Regression ............................................................................................................................. 19
Multiple Regression........................................................................................................................... 20
Resources .............................................................................................................................................. 21
Parametric or Nonparametric
When to use which statistical test? Parametric or Non-parametric. To answer this question, we
should look at two dimensions.
Scale of measurement
 If data is Nominal (gender) or Ordinal (low-to-high), Nonparametric test should be used
 If data is Interval (measures of temperature) or Ratio (income), Parametric test should be
used.
The population distribution
 If the population is Normally Distributed, Parametric test may be used.
 If the population is not Normally Distributed, Nonparametric test must be used.
Before going through the statistical tests, we'd better look at Parametric-Nonparametric comparison.
Parametric
 Information about population is completely known
 Specific assumptions are made regarding the population
 Null hypothesis is made on parameters of the population distribution
 Test statistics based on the distribution
 Parametric tests are applicable only for variable
 No parametric test exists for Nominal Scale data
 Parametric test is powerful, if exist
Non-Parametric
 No information about the population is available
 No assumptions are made regarding the population
 The null hypothesis is free from parameters
 Test statistic is arbitrary
 It is applied both variables and attributes
 Non-parametric test exists for nominal and ordinal scale data
 It is not so powerful like parametric tests
Parametric Tests
The parametric test is the hypothesis test which provides generalizations for making statements
about the mean of the parent population.
T-Test
T test is used to compare the mean of the two groups and it is decided whether the difference is
coincidental or statistically significant.
The 2008-09 nine-month academic salary for Assistant Professors, Associate Professors, and
Professors in a college in the U.S. In one-sample and two-independent sample T Tests, this data set
will be tested.
One-sample T Test
A one sample t-test allows us to test whether a sample mean (of a normally distributed interval
variable) significantly differs from a hypothesized value. It is applied to test the accuracy of the
prediction. This test is applied to test the degree of accuracy of any sample when it is made for a
given forecast.
Hypothesis
Ho: Avg. Salaries is equal to 90000
H1: Avg. Salaries is greater than 90000
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means Avg. Salaries is greater than 90000.
Two Independent Samples T Tests
An independent samples t-test is used when you want to compare the means of a normally
distributed interval dependent variable for two independent groups. It is applied to test the meaning
of the difference between the two arithmetic averages.
Hypothesis
Ho: Avg. Salaries of Male and Female are equal
H1: Avg. Salaries of Male and Female are not equal
 With 0.05 confidence level
Decision Making with Using P-value.
According to test result, p-value is equal to 0.002. When we compare the p-value with confidence
level;
P-value (0.002) < Confidence Level (0.05)
Reject Ho. It means Avg. Salaries of Male and Female are not equal.
Paired T Tests
A paired (samples) t-test is used when you have two related observations (i.e. two observations per
subject) and you want to see if the means on these two normally distributed interval variables differ
from one another
Birth and death rates for 69 countries. In Paired T Test, this data set will be tested.
Hypothesis
Ho: Differences between birth and death rate is 15
H1: Differences between birth and death rate is not 15
 With 0.05 confidence level.
Decision Making with Using P-value.
According to test result, p-value is equal to 0.001. When we compare the p-value with confidence
level;
P-value (0.001) < Confidence Level (0.05)
Reject Ho. It means Differences between birth and death rate is greater than 15.
ANOVA and Post Hoc
Analysis of Variance (ANOVA) used to test hypothesis the differences among group means and their
associated procedures
Data from a case-control study of (o)esophageal cancer in Ille-et-Vilaine, France. In one-way and two-
way ANOVA, and Post Hoc tests, this data set will be tested.
One-way ANOVA
One of the most widely known and used tests to compare multiple groups to one or more is "one
way analysis of variance". One of the prerequisites for the analysis of variance is that each group is
randomly selected from a master population with normal distribution. In addition, each group has an
equal variance.
Hypothesis
Ho: There is a statistically significance Relationship between “ncontrols” and “agegp”
H1: There is no statistically significance Relationship between “ncontrols” and “agegp”
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is equal to 0.022. When we compare the p-value with confidence
level;
P-value (0.022) < Confidence Level (0.05)
Reject Ho. It means there is a statistically significance relationship between “ncontrols” and “agegp”
Two-way ANOVA
One-way variance analysis for independent samples refers to one independent variable and one
dependent variable whereas two-way variance analysis refers to two independent variables and one
dependent variable. In the two-way analysis of variance, the main goal is to measure the joint effect
of the independent variables on the dependent variable.
Hypothesis
Ho: There is a statistically significance Relationship between “ncontrols” and “alcgp”, “tobgp”
H1: There is no statistically significance Relationship between “ncontrols” and “alcgp”, “tobgp”
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means there is no statistically significance Relationship between “ncontrols” and
“alcgp”, “tobgp”
Post-Hoc
Post-Hoc means to analyze the results of your experimental data.
Decision Making with Using P-value
With the Tukey test we see which combination whether supports the hypothesis or not.
Non-Parametric Tests
The nonparametric test is defined as the hypothesis test which is not based on underlying
assumptions, i.e. it does not require population’s distribution to be denoted by specific parameters.
Chi-Square
Distribution of hair and eye color and sex in students. In Chi Square, this data set will be
tested.
Hypothesis
Ho: Statistically dependent
H1: Statistically independent
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means statistically independent
Mann-Whitney U and Wilcoxon Test
Mann-Whitney U
It is a non-parametric test that is used to compare two population means that come from the same
population, it is also used to test whether two population means are equal or not. This test should be
applied when the conditions for the test "t" are not appropriate.
The 2008-09 nine-month academic salary for Assistant Professors, Associate Professors, and
Professors in a college in the U.S. In Mann-Whitney U test, this data set will be tested.
Hypothesis
Ho: The means of two populations are equal
H1: The means of two populations are not equal
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means the means of two populations are not equal.
Wilcoxon Signed Rank
The Wilcoxon test is a non-parametric statistical hypothesis test used when comparing two related
samples, matched samples, or repeated measurements on a single sample to assess whether their
population mean ranks differ. Also, it is the nonparametric test of the "paired t" test.
Birth and death rates for 69 countries. In Wilcoxon Test, this data set will be tested.
Hypothesis
Ho: The medians of two populations are equal
H1: The medians of two populations are not equal
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means the medians of two population are not equal.
Kruskal Wallis Test
The Kruskal-Wallis H test is used with the aim of testing whether there is a significant difference
between the two distributions by comparing the measures of a dependent variable on more than
one group (sample) independent of each other. The median value is used instead of the arithmetic
mean.
Students were administered two parallel forms of a test after a random assignment to three different
treatments. In Kruskal Wallis Test, this data set will be tested.
Hypothesis
Ho: Statistically significance difference
H1: Not Statistically significance difference
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means not statistically significance difference.
Correlation
Correlation
A correlation is useful when you want to see the linear relationship between two (or more) normally
distributed interval variables.
A simulated data set containing sales of child car seats at 400 different stores. In correlation, this
data set will be tested.
Pearson
Hypothesis
Ho: There is a statistically significance relationship
H1: There is no statistically significance relationship
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means there is no statistically significance relationship.
Spearman
Hypothesis
Ho: There is a statistically significance relationship
H1: There is no statistically significance relationship
With 0.05 confidence level
Decision Making with Using P-value.
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means there is no statistically significance relationship.
Kendall
Hypothesis
Ho: There is a statistically significance relationship
H1: There is no statistically significance relationship
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means there is no statistically significance relationship.
Regression
Simple Regression
Simple regression analysis examines the relationship between a dependent variable and an
independent variable. Simple regression analysis forms an equation of linearity that represents the
linear relationship between dependent and independent variables.
A simulated data set containing sales of child car seats at 400 different stores. In Simple and Multiple
Regression, this data set will be tested.
Hypothesis
Ho: Advertising increases the Sales
H1: Advertising does not increase the Sales
 With 0.05 confidence level.
Decision Making with Using P-value
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means Advertising does not increases the Sales.
Multiple Regression
Multiple regression analysis examines the relationship between a dependent variable and more than
one independent variable.
Hypothesis
Ho: Advertising and Income increase the Sales
H1: Advertising and Income do not increase the Sales
With 0.05 confidence level
Decision Making with Using P-value.
According to test result, p-value is very close to 0. When we compare the p-value with confidence
level;
P-value (very close to 0) < Confidence Level (0.05)
Reject Ho. It means Advertising and Income do not increase the Sales.
Resources
Difference Between Parametric or Nonparametric Test. (2017, 01 5). Key Differences:
http://keydifferences.com/difference-between-parametric-and-nonparametric-test.html
adresinden alındı
Elementary Statistics with R. (2017, 1 5). Elementary Statistics with R: http://www.r-
tutor.com/elementary-statistics adresinden alındı
Hipotez Testleri. (2017, 01 5). İstatistik Analiz Hakkında: http://www.istatistikanaliz.com/default.asp
adresinden alındı
İSTATİSTİK. (2017, 01 5). http://mustafaotrar.net/istatistik/ adresinden alındı
Using R for statistical analyses - Basic Statistics. (2017, 1 5). GardenerS own:
http://www.gardenersown.co.uk/education/lectures/r/basics.htm#t_test adresinden alındı
What statistical analysis should I use? (2017, 01 5). INSTITUTE FOR DIGITAL RESEARCH AND
EDUCATION: http://www.ats.ucla.edu/stat/stata/whatstat/whatstat.htm adresinden alındı

More Related Content

What's hot

Introduction to Bayesian Methods
Introduction to Bayesian MethodsIntroduction to Bayesian Methods
Introduction to Bayesian MethodsCorey Chivers
 
Maximum likelihood estimation
Maximum likelihood estimationMaximum likelihood estimation
Maximum likelihood estimationzihad164
 
Multiple Comparison_Applied Statistics, Data Science
Multiple Comparison_Applied Statistics, Data ScienceMultiple Comparison_Applied Statistics, Data Science
Multiple Comparison_Applied Statistics, Data ScienceMd Riaz Ahmed Khan
 
Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt finalpiyushdhaker
 
hypothesis testing
 hypothesis testing hypothesis testing
hypothesis testingzoheb khan
 
Maximum Likelihood Estimation
Maximum Likelihood EstimationMaximum Likelihood Estimation
Maximum Likelihood Estimationguestfee8698
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsankit_ppt
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSSParag Shah
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.pptOmDalvi4
 
inferencial statistics
inferencial statisticsinferencial statistics
inferencial statisticsanjaemerry
 

What's hot (20)

Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
Introduction to Bayesian Methods
Introduction to Bayesian MethodsIntroduction to Bayesian Methods
Introduction to Bayesian Methods
 
Maximum likelihood estimation
Maximum likelihood estimationMaximum likelihood estimation
Maximum likelihood estimation
 
Correlation
CorrelationCorrelation
Correlation
 
Multiple Comparison_Applied Statistics, Data Science
Multiple Comparison_Applied Statistics, Data ScienceMultiple Comparison_Applied Statistics, Data Science
Multiple Comparison_Applied Statistics, Data Science
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Bayesian intro
Bayesian introBayesian intro
Bayesian intro
 
The Sign Test
The Sign TestThe Sign Test
The Sign Test
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
 
Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt final
 
hypothesis testing
 hypothesis testing hypothesis testing
hypothesis testing
 
Maximum Likelihood Estimation
Maximum Likelihood EstimationMaximum Likelihood Estimation
Maximum Likelihood Estimation
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metrics
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSS
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.ppt
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
 
inferencial statistics
inferencial statisticsinferencial statistics
inferencial statistics
 
Hypothesis testing Part1
Hypothesis testing Part1Hypothesis testing Part1
Hypothesis testing Part1
 

Similar to Hypothesis Tests in R Programming

Parametric vs non parametric test
Parametric vs non parametric testParametric vs non parametric test
Parametric vs non parametric testar9530
 
20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhd20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhdHimanshuSharma723273
 
Statistical test
Statistical test Statistical test
Statistical test As Siyam
 
Basics of Hypothesis testing for Pharmacy
Basics of Hypothesis testing for PharmacyBasics of Hypothesis testing for Pharmacy
Basics of Hypothesis testing for PharmacyParag Shah
 
Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1shoffma5
 
Ebd1 lecture7 2010
Ebd1 lecture7 2010Ebd1 lecture7 2010
Ebd1 lecture7 2010Reko Kemo
 
Testing of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdfTesting of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdfRamBk5
 
Statistics for Lab Scientists
Statistics for Lab ScientistsStatistics for Lab Scientists
Statistics for Lab ScientistsMike LaValley
 
Quantitative_analysis.ppt
Quantitative_analysis.pptQuantitative_analysis.ppt
Quantitative_analysis.pptmousaderhem1
 
Statistics basics for oncologist kiran
Statistics basics for oncologist kiranStatistics basics for oncologist kiran
Statistics basics for oncologist kiranKiran Ramakrishna
 

Similar to Hypothesis Tests in R Programming (20)

Spss session 1 and 2
Spss session 1 and 2Spss session 1 and 2
Spss session 1 and 2
 
Parametric vs non parametric test
Parametric vs non parametric testParametric vs non parametric test
Parametric vs non parametric test
 
Meta analysis with R
Meta analysis with RMeta analysis with R
Meta analysis with R
 
20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhd20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhd
 
Statistical test
Statistical test Statistical test
Statistical test
 
spss
spss spss
spss
 
Lund 2009
Lund 2009Lund 2009
Lund 2009
 
T test
T test T test
T test
 
Basics of Hypothesis testing for Pharmacy
Basics of Hypothesis testing for PharmacyBasics of Hypothesis testing for Pharmacy
Basics of Hypothesis testing for Pharmacy
 
Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1
 
Ebd1 lecture7 2010
Ebd1 lecture7 2010Ebd1 lecture7 2010
Ebd1 lecture7 2010
 
Testing of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdfTesting of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdf
 
Tests of significance
Tests of significanceTests of significance
Tests of significance
 
Elements of inferential statistics
Elements of inferential statisticsElements of inferential statistics
Elements of inferential statistics
 
Bgy5901
Bgy5901Bgy5901
Bgy5901
 
Statistics for Lab Scientists
Statistics for Lab ScientistsStatistics for Lab Scientists
Statistics for Lab Scientists
 
Hypo
HypoHypo
Hypo
 
Quantitative_analysis.ppt
Quantitative_analysis.pptQuantitative_analysis.ppt
Quantitative_analysis.ppt
 
Statistics basics for oncologist kiran
Statistics basics for oncologist kiranStatistics basics for oncologist kiran
Statistics basics for oncologist kiran
 
T‑tests
T‑testsT‑tests
T‑tests
 

Recently uploaded

代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 

Recently uploaded (20)

代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 

Hypothesis Tests in R Programming

  • 1. Department of Management Information Systems FINAL REPORT Hypothesis Tests in R Programming Atacan Garip 1303041042 Ankara 2017
  • 2. Table of Contents Parametric or Nonparametric ................................................................................................................. 3 Scale of measurement......................................................................................................................... 3 The population distribution................................................................................................................. 3 Parametric........................................................................................................................................... 3 Non-Parametric................................................................................................................................... 3 Parametric Tests...................................................................................................................................... 4 T-Test................................................................................................................................................... 4 ANOVA and Post Hoc........................................................................................................................... 7 Non-Parametric Tests............................................................................................................................ 10 Chi-Square ......................................................................................................................................... 10 Mann-Whitney U and Wilcoxon Test ................................................................................................ 12 Kruskal Wallis Test............................................................................................................................. 14 Correlation............................................................................................................................................. 16 Correlation......................................................................................................................................... 16 Regression ............................................................................................................................................. 19 Simple Regression ............................................................................................................................. 19 Multiple Regression........................................................................................................................... 20 Resources .............................................................................................................................................. 21
  • 3. Parametric or Nonparametric When to use which statistical test? Parametric or Non-parametric. To answer this question, we should look at two dimensions. Scale of measurement  If data is Nominal (gender) or Ordinal (low-to-high), Nonparametric test should be used  If data is Interval (measures of temperature) or Ratio (income), Parametric test should be used. The population distribution  If the population is Normally Distributed, Parametric test may be used.  If the population is not Normally Distributed, Nonparametric test must be used. Before going through the statistical tests, we'd better look at Parametric-Nonparametric comparison. Parametric  Information about population is completely known  Specific assumptions are made regarding the population  Null hypothesis is made on parameters of the population distribution  Test statistics based on the distribution  Parametric tests are applicable only for variable  No parametric test exists for Nominal Scale data  Parametric test is powerful, if exist Non-Parametric  No information about the population is available  No assumptions are made regarding the population  The null hypothesis is free from parameters  Test statistic is arbitrary  It is applied both variables and attributes  Non-parametric test exists for nominal and ordinal scale data  It is not so powerful like parametric tests
  • 4. Parametric Tests The parametric test is the hypothesis test which provides generalizations for making statements about the mean of the parent population. T-Test T test is used to compare the mean of the two groups and it is decided whether the difference is coincidental or statistically significant. The 2008-09 nine-month academic salary for Assistant Professors, Associate Professors, and Professors in a college in the U.S. In one-sample and two-independent sample T Tests, this data set will be tested. One-sample T Test A one sample t-test allows us to test whether a sample mean (of a normally distributed interval variable) significantly differs from a hypothesized value. It is applied to test the accuracy of the prediction. This test is applied to test the degree of accuracy of any sample when it is made for a given forecast. Hypothesis Ho: Avg. Salaries is equal to 90000 H1: Avg. Salaries is greater than 90000  With 0.05 confidence level.
  • 5. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means Avg. Salaries is greater than 90000. Two Independent Samples T Tests An independent samples t-test is used when you want to compare the means of a normally distributed interval dependent variable for two independent groups. It is applied to test the meaning of the difference between the two arithmetic averages. Hypothesis Ho: Avg. Salaries of Male and Female are equal H1: Avg. Salaries of Male and Female are not equal  With 0.05 confidence level
  • 6. Decision Making with Using P-value. According to test result, p-value is equal to 0.002. When we compare the p-value with confidence level; P-value (0.002) < Confidence Level (0.05) Reject Ho. It means Avg. Salaries of Male and Female are not equal. Paired T Tests A paired (samples) t-test is used when you have two related observations (i.e. two observations per subject) and you want to see if the means on these two normally distributed interval variables differ from one another Birth and death rates for 69 countries. In Paired T Test, this data set will be tested.
  • 7. Hypothesis Ho: Differences between birth and death rate is 15 H1: Differences between birth and death rate is not 15  With 0.05 confidence level. Decision Making with Using P-value. According to test result, p-value is equal to 0.001. When we compare the p-value with confidence level; P-value (0.001) < Confidence Level (0.05) Reject Ho. It means Differences between birth and death rate is greater than 15. ANOVA and Post Hoc Analysis of Variance (ANOVA) used to test hypothesis the differences among group means and their associated procedures Data from a case-control study of (o)esophageal cancer in Ille-et-Vilaine, France. In one-way and two- way ANOVA, and Post Hoc tests, this data set will be tested.
  • 8. One-way ANOVA One of the most widely known and used tests to compare multiple groups to one or more is "one way analysis of variance". One of the prerequisites for the analysis of variance is that each group is randomly selected from a master population with normal distribution. In addition, each group has an equal variance. Hypothesis Ho: There is a statistically significance Relationship between “ncontrols” and “agegp” H1: There is no statistically significance Relationship between “ncontrols” and “agegp”  With 0.05 confidence level.
  • 9. Decision Making with Using P-value According to test result, p-value is equal to 0.022. When we compare the p-value with confidence level; P-value (0.022) < Confidence Level (0.05) Reject Ho. It means there is a statistically significance relationship between “ncontrols” and “agegp” Two-way ANOVA One-way variance analysis for independent samples refers to one independent variable and one dependent variable whereas two-way variance analysis refers to two independent variables and one dependent variable. In the two-way analysis of variance, the main goal is to measure the joint effect of the independent variables on the dependent variable. Hypothesis Ho: There is a statistically significance Relationship between “ncontrols” and “alcgp”, “tobgp” H1: There is no statistically significance Relationship between “ncontrols” and “alcgp”, “tobgp”  With 0.05 confidence level.
  • 10. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means there is no statistically significance Relationship between “ncontrols” and “alcgp”, “tobgp” Post-Hoc Post-Hoc means to analyze the results of your experimental data. Decision Making with Using P-value With the Tukey test we see which combination whether supports the hypothesis or not. Non-Parametric Tests The nonparametric test is defined as the hypothesis test which is not based on underlying assumptions, i.e. it does not require population’s distribution to be denoted by specific parameters. Chi-Square Distribution of hair and eye color and sex in students. In Chi Square, this data set will be tested.
  • 11. Hypothesis Ho: Statistically dependent H1: Statistically independent  With 0.05 confidence level. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means statistically independent
  • 12. Mann-Whitney U and Wilcoxon Test Mann-Whitney U It is a non-parametric test that is used to compare two population means that come from the same population, it is also used to test whether two population means are equal or not. This test should be applied when the conditions for the test "t" are not appropriate. The 2008-09 nine-month academic salary for Assistant Professors, Associate Professors, and Professors in a college in the U.S. In Mann-Whitney U test, this data set will be tested. Hypothesis Ho: The means of two populations are equal H1: The means of two populations are not equal  With 0.05 confidence level.
  • 13. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means the means of two populations are not equal. Wilcoxon Signed Rank The Wilcoxon test is a non-parametric statistical hypothesis test used when comparing two related samples, matched samples, or repeated measurements on a single sample to assess whether their population mean ranks differ. Also, it is the nonparametric test of the "paired t" test. Birth and death rates for 69 countries. In Wilcoxon Test, this data set will be tested. Hypothesis Ho: The medians of two populations are equal H1: The medians of two populations are not equal  With 0.05 confidence level.
  • 14. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means the medians of two population are not equal. Kruskal Wallis Test The Kruskal-Wallis H test is used with the aim of testing whether there is a significant difference between the two distributions by comparing the measures of a dependent variable on more than one group (sample) independent of each other. The median value is used instead of the arithmetic mean. Students were administered two parallel forms of a test after a random assignment to three different treatments. In Kruskal Wallis Test, this data set will be tested.
  • 15. Hypothesis Ho: Statistically significance difference H1: Not Statistically significance difference  With 0.05 confidence level.
  • 16. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means not statistically significance difference. Correlation Correlation A correlation is useful when you want to see the linear relationship between two (or more) normally distributed interval variables. A simulated data set containing sales of child car seats at 400 different stores. In correlation, this data set will be tested. Pearson Hypothesis Ho: There is a statistically significance relationship H1: There is no statistically significance relationship  With 0.05 confidence level.
  • 17. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means there is no statistically significance relationship. Spearman Hypothesis Ho: There is a statistically significance relationship H1: There is no statistically significance relationship With 0.05 confidence level
  • 18. Decision Making with Using P-value. According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means there is no statistically significance relationship. Kendall Hypothesis Ho: There is a statistically significance relationship H1: There is no statistically significance relationship  With 0.05 confidence level. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means there is no statistically significance relationship.
  • 19. Regression Simple Regression Simple regression analysis examines the relationship between a dependent variable and an independent variable. Simple regression analysis forms an equation of linearity that represents the linear relationship between dependent and independent variables. A simulated data set containing sales of child car seats at 400 different stores. In Simple and Multiple Regression, this data set will be tested. Hypothesis Ho: Advertising increases the Sales H1: Advertising does not increase the Sales  With 0.05 confidence level.
  • 20. Decision Making with Using P-value According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means Advertising does not increases the Sales. Multiple Regression Multiple regression analysis examines the relationship between a dependent variable and more than one independent variable. Hypothesis Ho: Advertising and Income increase the Sales H1: Advertising and Income do not increase the Sales With 0.05 confidence level Decision Making with Using P-value. According to test result, p-value is very close to 0. When we compare the p-value with confidence level; P-value (very close to 0) < Confidence Level (0.05) Reject Ho. It means Advertising and Income do not increase the Sales.
  • 21. Resources Difference Between Parametric or Nonparametric Test. (2017, 01 5). Key Differences: http://keydifferences.com/difference-between-parametric-and-nonparametric-test.html adresinden alındı Elementary Statistics with R. (2017, 1 5). Elementary Statistics with R: http://www.r- tutor.com/elementary-statistics adresinden alındı Hipotez Testleri. (2017, 01 5). İstatistik Analiz Hakkında: http://www.istatistikanaliz.com/default.asp adresinden alındı İSTATİSTİK. (2017, 01 5). http://mustafaotrar.net/istatistik/ adresinden alındı Using R for statistical analyses - Basic Statistics. (2017, 1 5). GardenerS own: http://www.gardenersown.co.uk/education/lectures/r/basics.htm#t_test adresinden alındı What statistical analysis should I use? (2017, 01 5). INSTITUTE FOR DIGITAL RESEARCH AND EDUCATION: http://www.ats.ucla.edu/stat/stata/whatstat/whatstat.htm adresinden alındı