Exercise 1

Wheezy the Weasel wants to know whether his cigarette smoking is excessive in the Fort Collins weasel population. You need to help him figure it out.

Wheezy smokes 40 cigarettes a week (x), while the average weasel smokes 30 cigarettes a week (μ) and the standard deviation is 10 cigarettes per week (σ).

  1. How does Wheezy’s smoking habit compare to his Fort Collins compatriots?
  1. Calculate the z-score, where \(z = (x - μ) / σ\).
# calculate z-score
zwheezy = (40-30)/10
zwheezy
## [1] 1
  1. Using the pnorm() function and the calculated z-score, find the probability and p-value.
# find the probability of z
pnorm(-abs(zwheezy))
## [1] 0.1586553
  1. Following the steps for hypothesis testing, interpret your results using plain language (steps are listed below).

The null hypothesis would be that there is no significant difference between Wheezys smoking and the normative amount of smoking in Fort Collins weasel population

The alpha level critical value would be 1.65 for an assumed p value of .05. The test statistic would be comparing the z score to p value.

The test z score for Wheezy was 1, since he was exactly 1 deviation away from the norm.

The p value .159 compared to the critical value of 1.65 means it is less than the critical value, meaning that we would reject the null hypothesis. Wheezys smoking is statistically significant.

Wheezys smoking is significantly higher than the average for fort collins weasels.

Exercise 2

Since returning from spring break, the stress of coursework has made Boozie Bear more thirsty than usual. At the start of the semester, Boozie drank an average of 12 beers per week (x), whereas the average CSU student drank 10 beers per week (μ) with a of standard deviation of 4 (σ).

However, since their return, Boozie has upped their intake to 24 cans of beer per week (x), while the intake of the broader student population remained the same. Compare Boozie’s binges to the average CSU student’s both before and after the break.

2.1 Determine Boozie’s pre-break consumption compared to the average CSU student.

  1. Calculate the z-score, where \(z = (x - μ) / σ\).
# use R to calculate the z-score
zprebreak = (12-10)/4
zprebreak
## [1] 0.5
n = 10
  1. Using the pnorm() function and the calculated z-score, find the probability and p-value.
# find the probability of z
pnorm(-abs(zprebreak))
## [1] 0.3085375
  1. Following the steps for hypothesis testing, interpret your results using plain language.

null hypothesis would be a neglible or no difference in boozys drinking pre or post break. alternative hypothesis would be that there is a difference between boozys pre and post break drinking habits.

The alpha level would be 1.65 for an assumed p value of .05.

The test statistic for boozys prebreak drinking was .5, being half a deviation above the mean.

Boozys prebreak drinking z score of .5 compared to critical value of 1.65 was not statistically significant, meaning it was an expected range of error, accepting the possibility of the null hypothesis.


2.2 Determine Boozie’s post-break consumption compared to the average CSU student.

  1. Calculate the z-score, where \(z = (x - μ) / σ\).
#  use R to calculate the z-score
zpostbreak = (24-10)/4
zpostbreak
## [1] 3.5
  1. Using the pnorm() function and the calculated z-score, find the probability and p-value.
# find the probability of z
pnorm(-abs(zpostbreak))
## [1] 0.0002326291
  1. Following the steps for hypothesis testing, interpret your results using plain language (steps are listed below). null hypothesis would be a neglible or no difference in boozys drinking pre or post break. alternative hypothesis would be that there is a difference between boozys pre and post break drinking habits.

Boozys postbreak drinking had a zscore of 3.5 deviations above the mean, showing a 3.5 times increase in drinking.

The alpha level would be 1.65 for an assumed p value of .05.

The test statistic for boozys prebreak drinking was .5, being half a deviation above the mean.

Boozys postbreak drinking z score of 3.5 is much higher than 1.65, rejecting the null hypotheis and inferring that there is a high likelihood it is correlated.

One-Sample Z-test, the Report:

Remember to complete all the steps for hypothesis testing in your report:

  1. State the null and alternative (research) hypotheses.
  2. State the level of risk associated with the null hypothesis, select the alpha level, and identify the appropriate test statistic.
  3. Calculate the test statistic.
  4. Find the p-value or confidence interval.
  5. Compare the obtained p-value to the critical value (alpha) and decide whether the null hypothesis should be rejected or retained.
  6. State your results and interpret the findings.