Difference between revisions of "Manuals/calci/CHITEST"

From ZCubes Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="font-size:30px">'''CHITEST(actualrange,expectedrange)'''</div><br/>
+
<div style="font-size:30px">'''CHITEST (ActualRange,ExpectedRange)'''</div><br/>
*<math>actualrange</math> is the array of observed values
+
*<math>ActualRange</math> is the array of observed values.
*<math>expectedrange</math> is the array of expected values
+
*<math>ExpectedRange</math> is the array of expected values.
 +
**CHITEST(), returns the test for independence.
  
 
==Description==
 
==Description==
*It is test for independence.
+
* It is a test for independence.
*This function gives the value from the chi-squared distribution and the appropriate degrees of freedom. i.e it calculates <math>\chi^2</math> statistic and degrees of freedom, then calls CHIDIST.  
+
* This function gives the value from the chi-squared distribution and the appropriate degrees of freedom i.e it calculates <math>\chi^2</math> statistic and degrees of freedom, then calls CHIDIST.  
 
The conditions of <math>\chi^2</math> test is  
 
The conditions of <math>\chi^2</math> test is  
 
  The table should be 2x2 or more than 2x2
 
  The table should be 2x2 or more than 2x2
Line 27: Line 28:
  
 
==ZOS==
 
==ZOS==
*The syntax is to calculate CHITEST in ZOS is <math>CHITEST(actualrange,expectedrange)</math>.
+
*The syntax is to calculate CHITEST in ZOS is <math>CHITEST (ActualRange,ExpectedRange)</math>.
**where <math>actual range</math>is the array of observed values.
+
**where <math>ActualRange</math>is the array of observed values.
**<math>expected range</math>is the array of expected values.
+
**<math>ExpectedRange</math>is the array of expected values.
*For e.g;chitest([60,72,86,45],[57.08,75.10,87.1,42.45])
+
*For e.g;CHITEST([60,72,86,45],[57.08,75.10,87.1,42.45])
 
{{#ev:youtube|gh-b_MUMo9c|280|center|Chi-Squared Test}}
 
{{#ev:youtube|gh-b_MUMo9c|280|center|Chi-Squared Test}}
  

Latest revision as of 09:57, 2 June 2020

CHITEST (ActualRange,ExpectedRange)


  • is the array of observed values.
  • is the array of expected values.
    • CHITEST(), returns the test for independence.

Description

  • It is a test for independence.
  • This function gives the value from the chi-squared distribution and the appropriate degrees of freedom 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
  • The obtained result is entered in the Chi square distribution table with the obtained degrees of freedom.
  • This returns the test for independence (probability).

ZOS

  • The syntax is to calculate CHITEST in ZOS is .
    • where is the array of observed values.
    • is the array of expected values.
  • For e.g;CHITEST([60,72,86,45],[57.08,75.10,87.1,42.45])
Chi-Squared Test

Examples

A student investigated the chance of getting viral fever in a school for a period that took vitamin tablets every day. 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 will not get fever and 220 students will get fever.
No Fever Get Fever
Observed Values 639 241
Expected Values 660 220
0.668 2
  • The value is 2.668
  • Now
  • From the Chi Squared Distribution probability table with is 1, the value of 2.668 is 0.10.

CHITEST(or,er) = 0.10

Related Videos

Chi Square Test

See Also

References

CHI-SQUARE Distribution