\[ X^{2}=\sum \frac{(Observed-Expected)^2}{Expected} \]
|
||||
|
Play chess |
Not play chess |
Sum (row) |
|
Like science fiction |
250(90) |
200(360) |
450 |
|
Not like science fiction |
50(210) |
1000(840) |
1050 |
|
Sum(col.) |
300 |
1200 |
1500 |
\[ X^{2}=\frac{(250-90)^2}{90} + \frac{(50-210)^2}{210} + \frac{(200-360)^2}{360} + \frac{(1000-840)^2} {840} = 507.93 \]
\[ a^{'}_{k} = (a_{k}-mean(A))/std(A) \]
\[ b^{'}_{k} = (b_{k}-mean(B))/std(B) \]
\[ correlation (A,B)=A^{'}.B^{'} \]
Correlation coefficient:
where n is the number of tuples, and are the respective mean or expected values of A and B, σA and σB are the respective standard deviation of A and B.
\[ v^{'}=\frac{v-min_{A}}{max_{A}-min_{A}}(newmax_{A} - newmin_{A})+ newmin_{A} \]
\[ \frac{73,600-12,000}{98,000-12,000}(1.0 - 0)+ 0 = 0.716 \]
\[ v^{'} = \frac{v-\mu_{A}}{\sigma _{A}} \]
\[ \frac{73,600-54,000}{16,000} = 1.225 \]
Where j is the smallest integer such that Max(|ν’|) < 1