Chapter 4: Problem 17
Let \(Y_{1}
Chapter 4: Problem 17
Let \(Y_{1}
All the tools & learning materials you need for study success - in one app.
Get started for freeLet \(X_{1}, X_{2}\) be a random sample of size \(n=2\) from the distribution
having pdf \(f(x ; \theta)=(1 / \theta) e^{-x / \theta}, 0
Twenty motors were put on test under a high-temperature setting. The lifetimes in hours of the motors under these conditions are given below. Also, the data are in the file lifetimemotor. rda at the site listed in the Preface. Suppose we assume that the lifetime of a motor under these conditions, \(X\), has a \(\Gamma(1, \theta)\) distribution. \(\begin{array}{cccccccccc}1 & 4 & 5 & 21 & 22 & 28 & 40 & 42 & 51 & 53 \\ 58 & 67 & 95 & 124 & 124 & 160 & 202 & 260 & 303 & 363\end{array}\) (a) Obtain a histogram of the data and overlay it with a density estimate, using the code hist \((x, p r=T) ;\) lines (density \((x))\) where the \(R\) vector \(x\) contains the data. Based on this plot, do you think that the \(\Gamma(1, \theta)\) model is credible? (b) Assuming a \(\Gamma(1, \theta)\) model, obtain the maximum likelihood estimate \(\widehat{\theta}\) of \(\theta\) and locate it on your histogram. Next overlay the pdf of a \(\Gamma(1, \hat{\theta})\) distribution on the histogram. Use the \(\mathrm{R}\) function dgamma \((\mathrm{x}\), shape \(=1\), scale \(=\hat{\theta}\) ) to evaluate the pdf. (c) Obtain the sample median of the data, which is an estimate of the median lifetime of a motor. What parameter is it estimating (i.e., determine the median of \(X\) )? (d) Based on the mle, what is another estimate of the median of \(X ?\)
Let \(X_{1}, \ldots, X_{n}\) be a random sample from a \(N(0,1)\) distribution. Then the probability that the random interval \(\bar{X} \pm t_{\alpha / 2, n-1}(s / \sqrt{n})\) traps \(\mu=0\) is \((1-\alpha)\). To verify this empirically, in this exercise, we simulate \(m\) such intervals and calculate the proportion that trap 0, which should be "close" to \((1-\alpha)\). (a) Set \(n=10\) and \(m=50\). Run the \(\mathrm{R}\) code mat=matrix (rnorm \((\mathrm{m} * \mathrm{n}), \mathrm{n} \overline{\mathrm{col}=\mathrm{n}})\) which generates \(m\) samples of size \(n\) from the \(N(0,1)\) distribution. Each row of the matrix mat contains a sample. For this matrix of samples, the function below computes the \((1-\alpha) 100 \%\) confidence intervals, returning them in a \(m \times 2\) matrix. Run this function on your generated matrix mat. What is the proportion of successful confidence intervals? (b) Run the following code which plots the intervals. Label the successful intervals. Comment on the variability of the lengths of the confidence intervals.
Recall For the baseball data (bb.rda), 15 out of 59 ballplayers are lefthanded. Let \(p\) be the probability that a professional baseball player is left-handed. Determine an exact \(90 \%\) confidence interval for \(p .\) Show first that the equations to be solved are: $$ \sum_{j=0}^{14}\left(\begin{array}{c} n \\ j \end{array}\right) \underline{\theta}^{j}(1-\underline{\theta})^{n-j}=0.95 \text { and } \sum_{j=0}^{15}\left(\begin{array}{c} n \\ j \end{array}\right) \bar{\theta}^{j}(1-\bar{\theta})^{n-j}=0.05 $$ Then do the following steps to obtain the confidence interval. (a) Show that \(0.10\) and \(0.17\) bracket the solution to the first equation. (b) Show that \(0.34\) and \(0.38\) bracket the solution to the second equation. (c) Then use the \(\mathrm{R}\) function binomci. \(\mathrm{r}\) to solve the equations.
In the baseball data set discussed in the last exercise, it was found that out of the 59 baseball players, 15 were left-handed. Is this odd, since the proportion of left-handed males in America is about \(11 \% ?\) Answer by using \((4.2 .7)\) to construct a \(95 \%\) approximate confidence interval for \(p\), the proportion of left-handed professional baseball players.
What do you think about this solution?
We value your feedback to improve our textbook solutions.