Computer Practicum 3

This computer practicum contains the following three parts:

Learning objectives

After this computer practicum the student should be able to do the following in R Commander:

  • Simulate a sampling distribution for the sum and the mean;

  • Identify estimates for the (population) mean \(\mu\) and (population) standard deviation \(\sigma\);

  • Construct a \((1 - \alpha) \times 100\%\) Confidence Interval (CI) for population mean \(\mu\);

  • Apply the Central Limit Theorem;

  • Apply a \(t\)-test for a population mean \(\mu\).

Part 1 - Simulate sampling a normal distribution: Sampling distribution of the mean

The following questions are related to the sampling distribution of the mean. Use R Commander to answer the questions.

Use the following information to answer questions a) up to and including c):
Assume that the height of a random male student (\(y\)) is normally distributed with expected value \(\mu = 182\) and standard deviation \(\sigma = 7\) (cm).

  1. Generate \(1000\) random samples each with same sample size \(n = 20\). So, \(1000\) times a sample is taken of \(20\) male students with a random height from the distribution \(\mbox{N}(\mu = 182,\ \sigma = 7)\). Go to: Distributions > Continuous distributions > Normal distribution > Sample from normal distribution\(\ldots\) Enter the correct value for the Mean, Standard deviation, Number of samples (rows), and Number of observations (columns). Place a check mark in the box in front of Sample standard deviations. The box in front of Sample means will contain a check mark by default. When filled in correctly, the settings should match Figure 1. Click the OK to create the data set “NormalSamples”. Take a look at the generated data set “NormalSamples”, and make an appropriate graph of the variable “mean”. Sketch the graph on the answer form.
Figure 1: Settings for Part 1 Question a).
  1. Explain why the sample means of the \(1000\) samples of size \(n = 20\) observations from the normal distribution are not all exactly equal to \(182\). Fill in the blank in the statement on the answer form, to indicate what the value of the mean of one row in the data set represents in terms of the (population) mean (or expected) value \(\mu\).

  2. Fill in the blank in the statement on the answer form, to indicate what the value of the standard deviation of one row in the data set represents in terms of the (population) standard deviation \(\sigma\). What value do you expect, when you average the \(1000\) sample variances? Compute the mean sample variance to check this. [Hint: first compute a new variable, e.g., “variance”, which represents the sample variance of each row. To calculate the squared value of variable “x” use “x^2”.]

  3. Calculate the mean and standard deviation of the distribution of the \(1000\) samples means [Hint: Statistics > Summaries > Numerical summaries\(\ldots\) for the variable “mean” , while asking for Mean and Standard Deviation on the Statistics tab]. Write your answers on the answer form.

Part 2 - Sampling distribution of the sum and the mean

In the article “Spatial differences and temporal changes in illicit drug use in Europe quantified by waste water analysis” (Addiction (2014), 109, pp.1338-1352) waste water is analysed to monitor the use of drugs in \(11\) countries and \(42\) cities in Europe. This research provides complementary evidence on drug consumption to traditional surveillance data. Waste water analysis can measure drug use more quickly, and regularly, than the current national surveys.

This part of the computer practicum will focus on the use of cocaine. This can be measured by determining the concentration Benzoylecgonine (BE load [mg / \(1000\) people / day]).

  1. Open a web browser and surf to the following URL: https://www.emcdda.europa.eu/publications/html/pods/waste-water-analysis_en. When the website appears click in the sidebar : “Data explorer”.

    Name five cities, which are the five cities with the highest cocaine consumption in 2017, by selecting Study year: “2017”, and Select a city: “NL:Amsterdam” in the top right corner of the data explorer.
    If you look specifically at Amsterdam, can you conclude that the use of cocaine in 2017 is higher in the weekends than on weekdays?

Use the following information for the questions b) to g). Suppose the BE load in waste water in Amsterdam (\(y\)) for a random day of the year has a normal distribution with an expected value of 650 and a standard deviation of \(250\) [mg/ \(1000\) people / day]. Use R Commander to answer the questions.

  1. Calculate the probability that on a random day the BE load is less than \(500\) [mg / \(1000\) people / day]. Visualize this probability in a graph.

  2. Calculate the probability that the mean BE load of \(16\) randomly selected days in a year is less than \(500\) [mg / \(1000\) people / day]. Note that this question is about the sampling distribution of the mean, in which the expected value is \(\ldots\) and the standard deviation is \(\ldots \rightarrow \bar{y} \sim \mbox{N}(\ldots,\ \ldots/\sqrt{\ldots})\). Write your answers on the answer form.

  3. Determine the probability, that the mean BE load of \(16\) randomly selected days in a year is between \(600\) and \(700\) [mg / \(1000\) people / day]. Visualize this probability in a graph.

  4. Determine the probability, that the total sum of the BE loads of \(16\) randomly selected days in a year is above \(11000\) [mg / 1000 people/ 16 days]. ). Note that this question is about the sample distribution of the sum, in which the expected value is \(\ldots\) and the standard deviation is \(\ldots \rightarrow \sum{y} \sim \mbox{N}(n \times \mu,\ \sqrt{n} \times \sigma)\).

  5. A statistician is raising questions about applying the normal distribution to model the BE load. In the weekends there are a lot of parties going on in Amsterdam. Therefore, she is thinking that the distribution of BE load is skewed to the \(\ldots\)

  6. When the sample size is raised to 49 randomly selected days, the statistician agrees with the application of the normal distribution for the mean BE load of 49 days. Can you explain why the statistician would accept the application of the normal distribution for the mean BE load of 49 randomly selected days?

Part 3 - Hypothesis test and \((1 - \alpha) \times 100\%\) CI for a (population) mean \(\mu_y\)

In a recent study at Wageningen University & Research a research group focused on the influence of different light conditions on plant growth for the species Arabidopsis thaliana (commonly known as thale cress, or mouse-ear cress).

The researchers have compared a fluctuating light setting, and a slow increase and decline of the light intensity (parabolic light) to the more standard constant lighting during daytime. While the parabolic lighting seems to have a positive impact on the weight of the plants, the fluctuating light suggests an adverse effect. From literature it is known, that the average weight of a plant under standard light conditions is about \(0.18\) g. It can be assumed, that plant weight is normally distributed.

The research group wants to show using \(25\) Arabidopsis thaliana plants, that the fluctuating light treatment will indeed result in a smaller average weight. When testing, use \(\alpha = 0.05\).

  1. What is the appropriate test to apply in this situation? Give arguments for your answer.

  2. Apply the first five steps of the test procedure for the appropriate test.

After the first \(5\) steps of the procedure, it is time to conduct the experiment/research. For the following steps the data can be used.

  1. Load the data in the file “BSP3_Weight_AT.RData” into R Commander.

  2. Next apply the one sample \(t\)-test in R Commander. Click in the top menu bar of the R Commander window Statistics > Means > Single-sample t-test\(\ldots\) Fill Null hypothesis: mu = \(0.18\). Choose, by setting the radio button, the correct Alternative Hypothesis for what you have denoted at step 1 of the procedure. Confidence level: \(0.95\). Click the OK button to execute the test.

  3. Now proceed with the test procedure and fill in the answer form.

  4. One of the assumptions for the one-sample \(t\)-test is that the variable \(y\) is normally distributed. Check this assumption in R Commander.

  5. Generate new output to get the appropriate \(95\%\) Confidence Interval for \(\mu\).

  6. Give an interpretation of this Confidence Interval in terms of the actual problem.