confint3: 2-Sided Confidence Interval (Extended Moodle Version)

Exercise template for computing the 2-sided confidence interval (with extended Moodle processing) for the mean based on a random sample.

Name:
confint3
Type:
Related:
Preview:

It is suspected that a supplier systematically underfills 5 l canisters of detergent. The filled volumes are assumed to be normally distributed. A small sample of \(13\) canisters is measured exactly. This shows that the canisters contain on average \(4948.1\) ml. The sample variance \(s^2_{n-1}\) is equal to \(352.1\).

Determine a \(95\%\) confidence interval for the average content of a canister (in ml).

What is the lower confidence bound?

What is the upper confidence bound?

The \(95\%\) confidence interval for the average content \(\mu\) in ml is given by: \[ \begin{aligned} & \left[\bar{y} \, - \, t_{n-1;0.975}\sqrt{\frac{s_{n-1}^2}{n}}, \; \bar{y} \, + \, t_{n-1;0.975}\sqrt{\frac{s_{n-1}^2}{n}}\right] \\ &= \left[ 4948.1 \, - \, 2.1788\sqrt{\frac{352.1}{13}}, \; 4948.1 \, + \, 2.1788\sqrt{\frac{352.1}{13}}\right] \\ &= \left[4936.761, \, 4959.439\right]. \end{aligned} \]

  • The lower confidence bound is \(4936.761\).
  • The upper confidence bound is \(4959.439\).

It is suspected that a supplier systematically underfills 5 l canisters of detergent. The filled volumes are assumed to be normally distributed. A small sample of \(13\) canisters is measured exactly. This shows that the canisters contain on average \(4956.6\) ml. The sample variance \(s^2_{n-1}\) is equal to \(1591.7\).

Determine a \(99\%\) confidence interval for the average content of a canister (in ml).

What is the lower confidence bound?

What is the upper confidence bound?

The \(99\%\) confidence interval for the average content \(\mu\) in ml is given by: \[ \begin{aligned} & \left[\bar{y} \, - \, t_{n-1;0.995}\sqrt{\frac{s_{n-1}^2}{n}}, \; \bar{y} \, + \, t_{n-1;0.995}\sqrt{\frac{s_{n-1}^2}{n}}\right] \\ &= \left[ 4956.6 \, - \, 3.0545\sqrt{\frac{1591.7}{13}}, \; 4956.6 \, + \, 3.0545\sqrt{\frac{1591.7}{13}}\right] \\ &= \left[4922.801, \, 4990.399\right]. \end{aligned} \]

  • The lower confidence bound is \(4922.801\).
  • The upper confidence bound is \(4990.399\).

It is suspected that a supplier systematically underfills 5 l canisters of detergent. The filled volumes are assumed to be normally distributed. A small sample of \(13\) canisters is measured exactly. This shows that the canisters contain on average \(4987.4\) ml. The sample variance \(s^2_{n-1}\) is equal to \(2763.1\).

Determine a \(95\%\) confidence interval for the average content of a canister (in ml).

What is the lower confidence bound?

What is the upper confidence bound?

The \(95\%\) confidence interval for the average content \(\mu\) in ml is given by: \[ \begin{aligned} & \left[\bar{y} \, - \, t_{n-1;0.975}\sqrt{\frac{s_{n-1}^2}{n}}, \; \bar{y} \, + \, t_{n-1;0.975}\sqrt{\frac{s_{n-1}^2}{n}}\right] \\ &= \left[ 4987.4 \, - \, 2.1788\sqrt{\frac{2763.1}{13}}, \; 4987.4 \, + \, 2.1788\sqrt{\frac{2763.1}{13}}\right] \\ &= \left[4955.635, \, 5019.165\right]. \end{aligned} \]

  • The lower confidence bound is \(4955.635\).
  • The upper confidence bound is \(5019.165\).
Description:
Computing the 2-sided confidence interval at 95% level for the mean based on a random sample. The exercise is a cloze with two numeric answers for the lower and upper bound of the confidence interval, respectively. Using the 'verbatim' clozetype for Moodle, the exercises yields 100% of the points for the correct solution based on t quantiles but still 50% for a partially correct solution based on normal quantiles.
Solution feedback:
Yes
Randomization:
Random numbers
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Raw: (1 random version)
PDF:
confint3-Rmd-pdf
confint3-Rnw-pdf
HTML:
confint3-Rmd-html
confint3-Rnw-html

(Note that the HTML output contains mathematical equations in MathML, rendered by MathJax using ‘mathjax = TRUE’. Instead it is also possible to use ‘converter = “pandoc-mathjax”’ so that LaTeX equations are rendered by MathJax directly.)

Demo code:

library("exams")

set.seed(403)
exams2html("confint3.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("confint3.Rmd")

set.seed(403)
exams2html("confint3.Rnw", mathjax = TRUE)
set.seed(403)
exams2pdf("confint3.Rnw")