[R] Chi-square test
Berend Hasselman
bhh at xs4all.nl
Fri Feb 20 19:13:14 CET 2015
> On 20-02-2015, at 19:05, pari hesabi <statistics84 at hotmail.com> wrote:
>
> Hello,
> If the vector of observed frequencies is: f<-c(0,0,0,2,3,6,17,15,21,21,14,10,5,1,5)
> and the vector of probability :p11<-c(7.577864e-06, 1.999541e-04 ,1.833510e-03, 9.059845e-03, 2.886977e-02, 6.546229e-02 ,1.124083e-01, 1.525880e-01, 1.689712e-01, 1.563522e-01, 1.232031e-01, 8.395000e-02, 5.009534e-02, 2.645857e-02,0.0205403)
> The sum of the probabilities is equal to one. But when I want to do the the Chi-square test, I get this error: probabilities must sum to one.
print sum(p11)-1
> Does anybody know the reason?
R FAQ 7.31 (http://cran.r-project.org/doc/FAQ/R-FAQ.html)
Berend
> Best Regards,
> pari
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list