Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Chi Square Tests - Goodness of Fit Test [Coffee drinkers]
freq = c(206, 193, 462, 739) probs = c(0.15, 0.13, 0.27, 0.45) alpha = 0.05 O= freq #Observed df= length(O)-1 N=sum(freq) #number of coffee drinkers E=N*probs # Expected X2 = sum((O-E)^2/E) pv = pchisq(X2,df,lower.tail=FALSE) cv = qchisq(alpha,df,lower.tail=FALSE) X2 # Chi-squared df # df pv # p-value cv # critical value # Make a conlusion if(X2 > cv){ print("There is enough statistical evidence to REJECT the null hypothesis and to believe that the old percentages no longer hold.") }else { print("There is not enough statistical evidence to reject the null hypothesis and to believe that the distributions are the same.") }
run
|
edit
|
history
|
help
0
Exercise 3 Matrices NBA TEST
Practice series1(37)
Regression
EulerEx2
Gab1A(resumido)
3dgraphics-and-curvesb
Tidyverse: Estructuras
errores resta
First program
1