55.8k views
0 votes
Before the presidential debates, it was expected that the percentages of registered voters in favor of various candidates to be as follows. Percent Democrats 48% Republicans 38% Independent 04% Undecided 10% After the presidential debates, a random sample of 1200 voters showed that 540 favored the Democratic candidate; 480 were in favor of the Republican candidate; 40 were in favor of the Independent candidate, and 140 were undecided. At 95% confidence, test to see if the proportion of voters has changed.

User Shevach
by
6.9k points

1 Answer

5 votes

Answer:


p_v = P(\chi^2_(3,0.05) >8.180)=0.0424

And we can find the p value using the following excel code:

"=1-CHISQ.DIST(8.180,3,TRUE)"

Since the p value is lower than the significance level we can to reject the null hypothesis at 5% of significance, and we can conclude that we have significant differences in the proportions assumed.

Explanation:

A chi-square goodness of fit test "determines if a sample data matches a population".

A chi-square test for independence "compares two variables in a contingency table to see if they are related. In a more general sense, it tests to see whether distributions of categorical variables differ from each another".

The observed values are given by:

Democratic 540

Republican 480

Independent 40

Undecided 140

We need to conduct a chi square test in order to check the following hypothesis:

H0: There is no difference in the proportions for the political party

H1: There is a difference in the proportions for the political party

The level os significance assumed for this case is
\alpha=0.05

The statistic to check the hypothesis is given by:


\sum_(i=1)^n ((O_i -E_i)^2)/(E_i)

Now we just need to calculate the expected values with the following formula
E_i = \% * total

And the calculations are given by:


E_(Democratic) =0.48*1200=576


E_(Republican) =0.38*1200=456


E_(Independent) =0.04*1200=48


E_(Undecided) =0.1*1200=120

And now we can calculate the statistic:


\chi^2 = ((540-576)^2)/(576)+((480-456)^2)/(456)+((40-48)^2)/(48)+((140-120)^2)/(120) =2.25+1.263158+1.33333+3.33333=8.180

Now we can calculate the degrees of freedom for the statistic given by:


df=(categories-1)=(4-1)=3

And we can calculate the p value given by:


p_v = P(\chi^2_(3,0.05) >8.180)=0.0424

And we can find the p value using the following excel code:

"=1-CHISQ.DIST(8.180,3,TRUE)"

Since the p value is lower than the significance level we can to reject the null hypothesis at 5% of significance, and we can conclude that we have significant differences in the proportions assumed.

User Anitra
by
6.1k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.