In: Statistics and Probability
12. The Pew Research Center claims that at least 54% of Californians favor a tax increase to pay for new schools. You decide to test this claim and ask a random sample of 80 citizens, and 36 favor the new tax. Use to test this claim.
a)
b)
c)
d)
e)
R-commands and outputs:
# Let p be the proportion of Californians who favor a tax increase to pay for new schools.
# Null hypothesis-H0: p=0.54
# Alternative hypothesis-H1: p >= 0.54
x=36 # number who favor the new tax
n=80 # sample size
p=x/n # sample proportion of Californians who
favor a tax increase
p
[1] 0.45
p0=0.54
q0=1-p0
q0
[1] 0.46
# Test statistic
z0=(p-p0)/sqrt(p0*q0/n)
z0
[1] -1.615146
# Test statistic follows standard normal distribution.
alpha=0.05
# Since, it is one-tailed test as we have to check value in single
direction (greater than 0.54).
qnorm(1-alpha) # Critical value of Z
[1] 1.644854
# Decision Rule: If calculated value of test statistic is less
than tabulated(critical) value, we fail to Reject H0.
# As, z0= is less than z(crit)= , we fail to Reject H0.
# Conclusion: The claim that at least 54% favor a tax increase
is FALSE.
pnorm(z0)
[1] 0.05313957
# If p-value is greater than alpha, then fail to Reject H0.
# Here, p-value=0.05313957 is greater than alpha, we fail to Reject
H0.