Difference between revisions of "Manuals/calci/CHITEST"
| Line 11: | Line 11: | ||
Each cell has an expected frequency of at least five. | Each cell has an expected frequency of at least five. | ||
*The <math>\chi^2</math> test first calculates a <math>\chi^2</math> statistic using the formula: | *The <math>\chi^2</math> test first calculates a <math>\chi^2</math> statistic using the formula: | ||
| − | <math>\chi^2 = \sum_{i=1}^{columns} \sum_{j=1}^{rows} \frac{(observed | + | <math>\chi^2 = \sum_{i=1}^{columns} \sum_{j=1}^{rows} \frac{(observed _ij-expected _ij)^{2}}{grand total}</math> |
*<math>observed ij</math> is the array of the observed values in a given set of values | *<math>observed ij</math> is the array of the observed values in a given set of values | ||
| − | *<math>expected ij = \frac{(column | + | *<math>expected ij = \frac{(column _i total)*(row _j total)}{grand total} </math> |
*observed and expected must have the same number of rows and columns and there must be atleast 2 values in each. | *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 <math>\chi^2</math> is an indicator of independence. | *A low result of <math>\chi^2</math> is an indicator of independence. | ||
*From the formula of <math>\chi^2</math> we will get <math>\chi^2</math> is always positive or 0. | *From the formula of <math>\chi^2</math> we will get <math>\chi^2</math> is always positive or 0. | ||
| − | *0 only if <math>observed | + | *0 only if <math>observed _ij = expected _ij</math> for each <math>i</math> and <math>j</math>. |
*CHITEST uses the <math>\chi^2</math> distribution with the number of Degrees of Freedom df. | *CHITEST uses the <math>\chi^2</math> distribution with the number of Degrees of Freedom df. | ||
*where <math>df=(r-1)(c-1),r>1</math> and <math>c>1</math>. | *where <math>df=(r-1)(c-1),r>1</math> and <math>c>1</math>. | ||
Revision as of 23:39, 26 November 2013
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ar} is the array of observed values
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle er} is the array of expected values
Description
- This function gives the the value from the chi-squared distribution and the appropriate degrees of freedom. i.e it calculates Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} statistic and degrees of freedom, then calls CHIDIST.
The conditions of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} test first calculates a Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} statistic using the formula:
Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle \chi ^{2}=\sum _{i=1}^{columns}\sum _{j=1}^{rows}{\frac {(observed_{i}j-expected_{i}j)^{2}}{grandtotal}}}
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle observed ij} is the array of the observed values in a given set of values
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle expected ij = \frac{(column _i total)*(row _j total)}{grand total} }
- 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} is an indicator of independence.
- From the formula of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} we will get Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} is always positive or 0.
- 0 only if Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle observed _ij = expected _ij} for each Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle i} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle j} .
- CHITEST uses the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} distribution with the number of Degrees of Freedom df.
- where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df=(r-1)(c-1),r>1} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle c>1} .
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r=1} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle c>1} , then Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df = c-1} or if Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r>1} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle c=1} , then Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df = r-1} .
If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r = c = 1}
then this function will give the error result
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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2} value is 2.668
- Now Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df=(r-1)(c-1) = (2-1)(2-1) = 1 }
- From the Chi Squared Distribution probability table with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle df}
is 1, the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \chi^2}
value of 2.668 is 0.10.
CHITEST(or,er) = 0.10