Determining Chi-Square test P-Value groups categorized by gender, political party.

BeeCuz

New member
Joined
Jun 6, 2016
Messages
26
To set the stage for the question, lets set up a typical sample problem:

A group of people are categorized by gender and also by political affiliation, and we wish to test the hypothesis that there is a relationship between the two categorizations.
\begin{array} {r|c c|c}
gender & republican & democrat & total\\
\hline
male & 30 & 20 & 50 \\
female & 20 & 30 & 50
\end{array}
\begin{array}{r l}
H_0 &: \text{gender and political affiliation are independent variables} \\
H_1 &: \text{gender and political affiliation are related} \\
\text{degrees of freedom} &: (rows - 1) \times (columns - 1) = 1
\end{array}
If the two dimensions were independent then we would have an expectation of equal portions in each of the four table entries
\begin{array} {r|c c|c}
gender & republican & democrat & total\\
\hline
male & 25 & 25 & 50 \\
female & 25 & 25 & 50
\end{array}
The test statistic X^2 is calculated by summing a computation for each cell of the table
\begin{array}
X^2 = \sum{\frac{(observed - expected)^2}{expected}}=
\frac{(30-25)^2}{25} + \frac{(20-25)^2}{25} +
\frac{(20-25)^2}{25} + \frac{(30-25)^2}{25} = 4
\end{array}
At this point we compare X^2 to a reference value X^2_a chosen for some desired confidence level a,and reject the null hypothesis if X^2 > X^2_a

Question
How can we determine the value a at which X^2 = X^2_a ?
 
To set the stage for the question, lets set up a typical sample problem:

A group of people are categorized by gender and also by political affiliation, and we wish to test the hypothesis that there is a relationship between the two categorizations.
\begin{array} {r|c c|c}
gender & republican & democrat & total\\
\hline
male & 30 & 20 & 50 \\
female & 20 & 30 & 50
\end{array}
\begin{array}{r l}
H_0 &: \text{gender and political affiliation are independent variables} \\
H_1 &: \text{gender and political affiliation are related} \\
\text{degrees of freedom} &: (rows - 1) \times (columns - 1) = 1
\end{array}
If the two dimensions were independent then we would have an expectation of equal portions in each of the four table entries
\begin{array} {r|c c|c}
gender & republican & democrat & total\\
\hline
male & 25 & 25 & 50 \\
female & 25 & 25 & 50
\end{array}
The test statistic X^2 is calculated by summing a computation for each cell of the table
\begin{array}
X^2 = \sum{\frac{(observed - expected)^2}{expected}}=
\frac{(30-25)^2}{25} + \frac{(20-25)^2}{25} +
\frac{(20-25)^2}{25} + \frac{(30-25)^2}{25} = 4
\end{array}
At this point we compare X^2 to a reference value X^2_a chosen for some desired confidence level a,and reject the null hypothesis if X^2 > X^2_a

Question
How can we determine the value a at which X^2 = X^2_a ?

Please read:

https://en.wikipedia.org/wiki/Chi-squared_test
 
Top