marketing survey using testing population proportion
case study:
A soft drink maker claims that a majority of adults prefer its leading
beverage over that of its main competitor’s. To test this claim 500 randomly
selected people were given the two beverages in random order to taste.
Among them, 270 preferred the soft drink maker’s brand, 211 preferred the
competitor’s brand and 19 could not make up their minds. Determine
whether there is sufficient evidence, at the 5% level of significance, to
support the soft drink maker’s claim against the default that the population
is evenly split in its preference. solution:
sample_size = 500
sample_p = 271/ sample_size
comp_sample_p = 211/sample_size
alfa = 0.05 # level of significance
#step zero:
# check if the smaple is large enough
error = sqrt((sample_p * (1 - sample_p))/sample_size)
between(c(sample_p - 3*error, sample_p - 3*error), 0, 1)
#[1] TRUE TRUE, it means that the sample is large enough
# step one:establishing the test heypothesis:
#H0 population proportion = p0 = 0.500 # claimed proportion for higher popularity
#Ha population proportion > p0 =0.500 # it is a right tailed test
#step two & three: calculating test statistic
z_value = (sample_p - 0.50)/ sqrt((0.5*0.5)/sample_size)
#step 4: finding rejection region/ interval:
#finding the q value
q_value = - qnorm(0.05, mean = 0, sd = 1)
sets::interval(q_value, Inf, "[)")
#[1.64485362695147, Inf)
# step five: decision making
between(z_value, q_value, Inf)
#[1] TRUE
conclusion:
the test statistic falls in the rejection region. The decision is to reject H0. In the context of the problem our
conclusion is:
The data provide sufficient evidence, at the 5% level of
significance, to conclude that a majority of adults prefer the
company’s beverage to that of their competitor’s.
Comments
Post a Comment