Difference between revisions of "Manuals/calci/CHITEST"

From ZCubes Wiki
Jump to navigation Jump to search
Line 49: Line 49:
 
| 220
 
| 220
 
|}
 
|}
{| class="wikitable" | style="width:100%;
+
{| class="wikitable" | style="width:100%";
 
|-
 
|-
 
!  
 
!  

Revision as of 00:03, 26 November 2013

CHITEST(ar,er)


  • is the array of observed values
  • is the array of expected values

Description

  • This function gives the the value from the chi-squared distribution. i.e it calculates  statistic and degrees of freedom, then calls CHIDIST.

The conditions of test is

The table should be 2x2 or more than 2x2
Each observations should not be dependent
All expected values should be 10 or greater. 
Each cell has an expected frequency of at least five.
  • The test first calculates a statistic using the formula:

  • is the array of the observed values in a given set of values
  • observed and expected must have the same number of rows and columns and there must be atleast 2 values in each.
  • A low result of is an indicator of independence.
  • From the formula of we will get is always positive or 0.
  • 0 only if for each and .
  • CHITEST uses the distribution with the number of Degrees of Freedom df.
where  and .
If  and , then  or if  and , then .
If  then this function will give the error result

Examples

A student investigated the chance of getting viral fever for a period of a school that took vitamin tablets every day. A student investigated whether taking vitamin tablets every day for a school term affected peoples chances of getting a Viral fever during the period. The total number of students 880. In that 639 students didn't get viral fever and 241 students got fever .But the expected ratio is 1:3. Answer:

If the ratio is 1:3 and the total number of observed individuals is 880, then the expected numerical values should be 660 didn't get and 220 students will get that fever.  
                     Didn't get fever        Get fever

observed 639 241 values

Expected values 660 220

No Fever Get Fever
Observed Values 639 241
Expected Values 660 220
No Fever Get Fever
Observed Values 639 241
Expected Values 660 220


(oi-ei)^2/ei 0.668 2 The x^2 value is 2.668 Now df=(r-1)(c-1)=(2-1)(2-1)=1 From the chisquared distribution probability table with df is 1 for the X^2 value 2.668 is 0.10. i.e CHITEST(or,er)=0.10"


Let’s see an example
B C
45 38
10 23
12 26
40.5 49.36
19.56 16.44
17.05 17.41
CHITEST (a, b)
i.e. =CHITEST (B2; C4, B5:C7) is 0.003

See Also

References

CHI-SQUARE Distribution