Showing posts with label chisquare. Show all posts
Showing posts with label chisquare. Show all posts

Monday, June 8, 2020

Python for MBA's: Chisqaure test

Chi sqaure test using Google Colab



Independent test

Problem 1:

Perform the chi-square test for the following values
14,16,12,15,17

coding


import numpy as np
 
from scipy.stats import chisquare
 
chisquare([14,16,12,15,17])
 

output

Power_divergenceResult(statistic=1.0, 
pvalue=0.9097959895689501)
 

Thursday, June 4, 2020

R for MBA's- Chi sqaure test(Independent)


R for MBA's - Chi sqaure test (independent)


coding



x<-(1567,1233,1456,1678,1456,1111,1895)

> chisq.test(x)

Output


 Chi-squared test for given probabilities

data:  x

X-squared = 280.87, df = 6, p-value < 2.2e-16