Test the hypothesis two ways (1) using the Chi-square test and (2) using the z-test for independence with significance level of 10%. Show how the two test statistics are related and compare the p-values. This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the. Apple Magic Keyboard, Magic Mouse 2, Magic Trackpad 2. Redesigned to be fully rechargeable and even more of a joy to use.
- 1.1 Perfect Squares And Related Patternsmr. Mac's Page Numbers
- 1.1 Perfect Squares And Related Patternsmr. Mac's Page Number
- 1.1 Perfect Squares And Related Patternsmr. Mac's Page Sheet
- 1.1 Perfect Squares And Related Patternsmr. Mac's Page Key
Perfect Squares and their Square Roots
Perfect Square:
Taking a positive integer and squaring it (multiplying it by itself) equals a perfect square.
Example: 3 x 3 = 9 Thus: 9 is a perfect square.
Taking the square root (principal square root) of that perfect square equals the original positive integer.
Example: √ 9 = 3 Where: 3 is the original integer.
Note: An integer has no fractional or decimal part, and thus a perfect square (which is also an integer) has no fractional or decimal part.
( Perfect Squares List from 1 to 10,000. )
Positive Integer | Integer Squared= | Perfect Squares List | Square Root of Perfect Square= | Original Integer |
---|---|---|---|---|
1 | 1 ^2 = | 1 | √ 1 = | 1 |
2 | 2 ^2 = | 4 | √ 4 = | 2 |
3 | 3 ^2 = | 9 | √ 9 = | 3 |
4 | 4 ^2 = | 16 | √ 16 = | 4 |
5 | 5 ^2 = | 25 | √ 25 = | 5 |
6 | 6 ^2 = | 36 | √ 36 = | 6 |
7 | 7 ^2 = | 49 | √ 49 = | 7 |
8 | 8 ^2 = | 64 | √ 64 = | 8 |
9 | 9 ^2 = | 81 | √ 81 = | 9 |
10 | 10 ^2 = | 100 | √ 100 = | 10 |
11 | 11 ^2 = | 121 | √ 121 = | 11 |
12 | 12 ^2 = | 144 | √ 144 = | 12 |
13 | 13 ^2 = | 169 | √ 169 = | 13 |
14 | 14 ^2 = | 196 | √ 196 = | 14 |
15 | 15 ^2 = | 225 | √ 225 = | 15 |
16 | 16 ^2 = | 256 | √ 256 = | 16 |
17 | 17 ^2 = | 289 | √ 289 = | 17 |
18 | 18 ^2 = | 324 | √ 324 = | 18 |
19 | 19 ^2 = | 361 | √ 361 = | 19 |
20 | 20 ^2 = | 400 | √ 400 = | 20 |
21 | 21 ^2 = | 441 | √ 441 = | 21 |
22 | 22 ^2 = | 484 | √ 484 = | 22 |
23 | 23 ^2 = | 529 | √ 529 = | 23 |
24 | 24 ^2 = | 576 | √ 576 = | 24 |
25 | 25 ^2 = | 625 | √ 625 = | 25 |
26 | 26 ^2 = | 676 | √ 676 = | 26 |
27 | 27 ^2 = | 729 | √ 729 = | 27 |
28 | 28 ^2 = | 784 | √ 784 = | 28 |
29 | 29 ^2 = | 841 | √ 841 = | 29 |
30 | 30 ^2 = | 900 | √ 900 = | 30 |
31 | 31 ^2 = | 961 | √ 961 = | 31 |
32 | 32 ^2 = | 1024 | √ 1024 = | 32 |
33 | 33 ^2 = | 1089 | √ 1089 = | 33 |
34 | 34 ^2 = | 1156 | √ 1156 = | 34 |
35 | 35 ^2 = | 1225 | √ 1225 = | 35 |
36 | 36 ^2 = | 1296 | √ 1296 = | 36 |
37 | 37 ^2 = | 1369 | √ 1369 = | 37 |
38 | 38 ^2 = | 1444 | √ 1444 = | 38 |
39 | 39 ^2 = | 1521 | √ 1521 = | 39 |
40 | 40 ^2 = | 1600 | √ 1600 = | 40 |
41 | 41 ^2 = | 1681 | √ 1681 = | 41 |
42 | 42 ^2 = | 1764 | √ 1764 = | 42 |
43 | 43 ^2 = | 1849 | √ 1849 = | 43 |
44 | 44 ^2 = | 1936 | √ 1936 = | 44 |
45 | 45 ^2 = | 2025 | √ 2025 = | 45 |
46 | 46 ^2 = | 2116 | √ 2116 = | 46 |
47 | 47 ^2 = | 2209 | √ 2209 = | 47 |
48 | 48 ^2 = | 2304 | √ 2304 = | 48 |
49 | 49 ^2 = | 2401 | √ 2401 = | 49 |
50 | 50 ^2 = | 2500 | √ 2500 = | 50 |
51 | 51 ^2 = | 2601 | √ 2601 = | 51 |
52 | 52 ^2 = | 2704 | √ 2704 = | 52 |
53 | 53 ^2 = | 2809 | √ 2809 = | 53 |
54 | 54 ^2 = | 2916 | √ 2916 = | 54 |
55 | 55 ^2 = | 3025 | √ 3025 = | 55 |
56 | 56 ^2 = | 3136 | √ 3136 = | 56 |
57 | 57 ^2 = | 3249 | √ 3249 = | 57 |
58 | 58 ^2 = | 3364 | √ 3364 = | 58 |
59 | 59 ^2 = | 3481 | √ 3481 = | 59 |
60 | 60 ^2 = | 3600 | √ 3600 = | 60 |
61 | 61 ^2 = | 3721 | √ 3721 = | 61 |
62 | 62 ^2 = | 3844 | √ 3844 = | 62 |
63 | 63 ^2 = | 3969 | √ 3969 = | 63 |
64 | 64 ^2 = | 4096 | √ 4096 = | 64 |
65 | 65 ^2 = | 4225 | √ 4225 = | 65 |
66 | 66 ^2 = | 4356 | √ 4356 = | 66 |
67 | 67 ^2 = | 4489 | √ 4489 = | 67 |
68 | 68 ^2 = | 4624 | √ 4624 = | 68 |
69 | 69 ^2 = | 4761 | √ 4761 = | 69 |
70 | 70 ^2 = | 4900 | √ 4900 = | 70 |
71 | 71 ^2 = | 5041 | √ 5041 = | 71 |
72 | 72 ^2 = | 5184 | √ 5184 = | 72 |
73 | 73 ^2 = | 5329 | √ 5329 = | 73 |
74 | 74 ^2 = | 5476 | √ 5476 = | 74 |
75 | 75 ^2 = | 5625 | √ 5625 = | 75 |
76 | 76 ^2 = | 5776 | √ 5776 = | 76 |
77 | 77 ^2 = | 5929 | √ 5929 = | 77 |
78 | 78 ^2 = | 6084 | √ 6084 = | 78 |
79 | 79 ^2 = | 6241 | √ 6241 = | 79 |
80 | 80 ^2 = | 6400 | √ 6400 = | 80 |
81 | 81 ^2 = | 6561 | √ 6561 = | 81 |
82 | 82 ^2 = | 6724 | √ 6724 = | 82 |
83 | 83 ^2 = | 6889 | √ 6889 = | 83 |
84 | 84 ^2 = | 7056 | √ 7056 = | 84 |
85 | 85 ^2 = | 7225 | √ 7225 = | 85 |
86 | 86 ^2 = | 7396 | √ 7396 = | 86 |
87 | 87 ^2 = | 7569 | √ 7569 = | 87 |
88 | 88 ^2 = | 7744 | √ 7744 = | 88 |
89 | 89 ^2 = | 7921 | √ 7921 = | 89 |
90 | 90 ^2 = | 8100 | √ 8100 = | 90 |
91 | 91 ^2 = | 8281 | √ 8281 = | 91 |
92 | 92 ^2 = | 8464 | √ 8464 = | 92 |
93 | 93 ^2 = | 8649 | √ 8649 = | 93 |
94 | 94 ^2 = | 8836 | √ 8836 = | 94 |
95 | 95 ^2 = | 9025 | √ 9025 = | 95 |
96 | 96 ^2 = | 9216 | √ 9216 = | 96 |
97 | 97 ^2 = | 9409 | √ 9409 = | 97 |
98 | 98 ^2 = | 9604 | √ 9604 = | 98 |
99 | 99 ^2 = | 9801 | √ 9801 = | 99 |
100 | 100 ^2 = | 10000 | √ 10000 = | 100 |
Say we have study of two categorical variables each with only two levels. One of the response levels is considered the 'success' response and the other the 'failure' response. A general 2 × 2 table of the observed counts would be as follows:
Success | Failure | Total | |
---|---|---|---|
Group 1 | A | B | A + B |
Group 2 | C | D | C + D |
The observed counts in this table represent the following proportions:
Success | Failure | Total | |
---|---|---|---|
Group 1 | (hat{p}_1=frac{A}{A+B}) | (1-hat{p}_1) | A + B |
Group 2 | (hat{p}_2=frac{C}{C+D}) | (1-hat{p}_2) | C + D |
Recall from our Z-test of two proportions that our null hypothesis is that the two population proportions, (p_1) and (p_2), were assumed equal while the two-sided alternative hypothesis was that they were not equal.
This null hypothesis would be analogous to the two groups being independent.
Also, if the two success proportions are equal, then the two failure proportions would also be equal. Note as well that with our Z-test the conditions were that the number of successes and failures for each group was at least 5. That equates to the Chi-square conditions that all expected cells in a 2 × 2 table be at least 5. (Remember at least 80% of all cells need an expected count of at least 5. With 80% of 4 equal to 3.2 this means all four cells must satisfy the condition).
When we run a Chi-square test of independence on a 2 × 2 table, the resulting Chi-square test statistic would be equal to the square of the Z-test statistic (i.e., ((Z^*)^2)) from the Z-test of two independent proportions.
1.1 Perfect Squares And Related Patternsmr. Mac's Page Numbers
Political Affiliation and Opinion Section
1.1 Perfect Squares And Related Patternsmr. Mac's Page Number
Consider the following example where we form a 2 × 2 for the Political Party and Opinion by only considering the Favor and Opposed responses:
favor | oppose | Total | |
---|---|---|---|
democrat | 138 | 64 | 202 |
republican | 64 | 84 | 148 |
Total | 202 | 148 | 350 |
The Chi-square test produces a test statistic of 22.00 with p-value 0.00
The Z-test comparing the two sample proportions of (hat{p}_d=frac{138}{202}=0.683) minus (hat{p}_r=frac{64}{148}=0.432) results in a Z-test statistic of (4.69) with p-value of (0.000).
If we square the Z-test statistic, we get (4.69^2 = 21.99) or (22.00) with rounding error.
Try it! Section
The condiments and gender data was condensed to consider gender and either mustard or ketchup. The manager wants to know if the proportion of males that prefer ketchup is the same as the proportion of females that prefer ketchup. Test the hypothesis two ways (1) using the Chi-square test and (2) using the z-test for independence with significance level of 10%. Show how the two test statistics are related and compare the p-values.
Condiment | |||
---|---|---|---|
Gender | Ketchup | Mustard | Total |
Male | 15 | 23 | 38 |
Female | 25 | 19 | 44 |
Total | 40 | 42 | 82 |
Z-test for two proportions
The hypotheses are:
(H_0colon p_1-p_2=0)
(H_acolon p_1-p_2ne 0)
Let males be denoted as sample one and females as sample two. Using the table, we have:
(n_1=38) and (hat{p}_1=frac{15}{38}=0.395)
(n_2=44) and (hat{p}_2=frac{25}{44}=0.568)
The conditions are satisfied for this test (verify for extra practice).
To calculate the test statistic, we need:
(p^*=dfrac{x_1+x_2}{n_1+n_2}=dfrac{15+25}{38+44}=dfrac{40}{82}=0.4878)
The test statistic is:
begin{align} z^*&=dfrac{hat{p}_1-hat{p}_2-0}{sqrt{p^*(1-p^*)left(frac{1}{n_1}+frac{1}{n_2}right)}}&=dfrac{0.395-0.568}{sqrt{0.4878(1-0.4878)left(frac{1}{38}+frac{1}{44}right)}}&=-1.567end{align}
The p-value is (2P(Z<-1.567)=0.1172).
1.1 Perfect Squares And Related Patternsmr. Mac's Page Sheet
The p-value is greater than our significance level. Therefore, there is not enough evidence in the data to suggest that the proportion of males that prefer ketchup is different than the proportion of females that prefer ketchup.
Chi-square Test for independence
The expected count table is:
Condiment | |||
---|---|---|---|
Gender | Ketchup | Mustard | Total |
Male | 15 (18.537) | 23 (19.463) | 38 |
Female | 25 (21.463) | 19 (22.537) | 44 |
Total | 40 | 42 | 82 |
There are no expected counts less than 5. The test statistic is:
1.1 Perfect Squares And Related Patternsmr. Mac's Page Key
(chi^{2*}=dfrac{(15-18.537)^2}{18.537}+dfrac{(23-19.463)^2}{19.463}+dfrac{(25-21.463)^2}{21.463}+dfrac{(19-22.537)^2}{22.537}=2.46 )
With 1 degree of freedom, the p-value is 0.1168. The p-value is greater than our significance value. Therefore, there is not enough evidence to suggest that gender and condiments (ketchup or mustard) are related.