Skip to main content

Section 10.6 Exercises

Checkpoint 10.6.1.

In SubsectionΒ 10.3.2 we compare the average against the mid-range as estimators of the expectation of the measurement. The goal of this exercise is to repeat the analysis, but this time compare the average to the median as estimators of the expectation in symmetric distributions.
  1. Simulate the sampling distribution of average and the median of a sample of size \(n=100\) from the \(\mathrm{Normal}(3,2)\) distribution. Compute the expectation and the variance of the sample average and of the sample median. Which of the two estimators has a smaller mean square error?
  2. Simulate the sampling distribution of average and the median of a sample of size \(n=100\) from the \(\mathrm{Uniform}(0.5,5.5)\) distribution. Compute the expectation and the variance of the sample average and of the sample median. Which of the two estimators has a smaller mean square error?

Checkpoint 10.6.2.

The goal in this exercise is to assess estimation of a proportion in a population on the basis of the proportion in the sample.
The file pop2.csv was introduced in Exercise of ChapterΒ 7. This file contains information associated to the blood pressure of an imaginary population of size 100,000. The file can be found on the internet (http://pluto.huji.ac.il/~msby/StatThink/Datasets/pop2.csv). One of the variables in the file is a factor by the name group that identifies levels of blood pressure. The levels of this variable are HIGH, LOW, and NORMAL.
The file ex2.csv contains a sample of size \(n=150\) taken from the given population. This file can also be found on the internet (http://pluto.huji.ac.il/~msby/StatThink/Datasets/ex2.csv). It contains the same variables as in the file pop2.csv. The file ex2.csv corresponds in this exercise to the observed sample and the file pop2.csv corresponds to the unobserved population.
Download both files to your computer and answer the following questions:
  1. Compute the proportion in the sample of those with a high level of blood pressure
     1 
    Hint: You may use the function summary or you may note that the expression variable==level produces a sequence with logical TRUE or FALSE entries that identify entries in the sequence variable that obtain the value level.
    .
  2. Compute the proportion in the population of those with a high level of blood pressure.
  3. Simulate the sampling distribution of the sample proportion and compute its expectation.
  4. Compute the variance of the sample proportion.
  5. It is proposed in SectionΒ 10.5 that the variance of the sample proportion is \(\Var(\hat P) = p(1-p)/n\text{,}\) where \(p\) is the probability of the event (having a high blood pressure in our case) and \(n\) is the sample size (\(n=150\) in our case). Examine this proposal in the current setting.