Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ChiSq
//g++ 7.4.0 //Chi square value: finding the Chi square value //created by Rezaul Hoque on Dec 23,2020 //contact at jewelmrh@yahoo.com #include <iostream> #include <cmath> using namespace std; int main () { int n=10; //Observed frequency float o[n]={12,8,20,2,14,10,15,6,9,4}; //Expected frequency float e[n]={10,10,10,10,10,10,10,10,10,10}; float chi=0; for (int i=0;i<n;i++) { chi +=( (o[i]-e[i])*(o[i]-e[i]))/e[i]; } cout<<"The Chi square is:\t"<<chi; return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Kalkulator z bajerami
Bucket Graph Creation
A+B ორობით სისტემაში
Tubee c++
Yo que se
ugly quick sort
Boost adapters foreach
Addition of two matrix **Part 1
barai_1
Filtering a vector attribute with template UnaryPredicate
Please log in to post a comment.