Hypothesis Testing using R - ChiSquareTest

Consider the following treadmill usage data:
ProductAgeGenderEducationMarital StatusUsageFitnessIncomeMiles
TM19518Male14Single3429562112
TM19519Male15Single233183675
TM19519Female14Partnered433069966
TM19519Male12Single333297385
TM19520Male13Partnered423524747
TM19520Female14Partnered333297366
TM19521Female14Partnered333524775
TM19521Male13Single333297385
TM19521Male15Single5435247141
TM19521Female15Partnered233752185
TM49819Male14Single333183664
TM49820Male14Single233297353
TM49820Female14Partnered3334110106
TM49820Male14Single333865895
TM49821Female14Partnered5434110212
TM49821Male16Partnered223411042
TM49821Male12Partnered223297353
TM49823Male14Partnered333638495
TM49823Male14Partnered333865885
TM49823Female16Single334548095

NULL Hypothesis
H0: Miles and Marital.Status are independent
Ha: Miles and Marital.Status are not independent

SOLUTION
attach(mydata);

tabProdGend = table(Miles, Marital.Status)
tabProdGend

#CHI-SQUARE
chisq.test(tabProdGend)

OUTPUT


CONCLUSION
  • Since P-value is greater than Alpha, we do not reject the NULL hypothesis
  • There is a strong relation between Miles clocked to Marital.Status 

REFERENCES

Comments