alpha=0.05
o=c(24,98,95,23)
n=sum(o);n
ratio=c(1/8,3/8,3/8,1/8)
e=n*ratio;e
chisq_compute=sum((o-e)^2/e);chisq_compute
df=3
sig_1_tailed=1-pchisq(chisq_compute,df);sig_1_tailed
chisq_critical=qchisq(1-alpha,df);chisq_critical
chisq.test(o,p=ratio)
chisq.test(o,p=e,rescale.p=TRUE)
