--- title: "Math 151 - Probability Theory - Homework 14" author: "your name here" date: "Due Friday, May 3, 2019" output: pdf_document: default html_document: df_print: paged --- ```{r warning=FALSE, comment=FALSE, message=FALSE,} knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.height=3, fig.width=5, fig.align = "center") ``` [5] DeGroot, section 5.6 Let $X_1, X_2$ and $X_3$ be independent lifetimes of memory chips. Suppose that each $X_i$ has the normal distribution with mean 300 hours and standard deviation 10 hours. Compute the probability that at least one of the three chips lasts at least 290 hours. (Use the table in the back of your book or `pnorm`.) [6] DeGrooot, section 5.6 If the m.g.f. of a random variable $X$ is $\psi(t) = e^{t^2}$ for $- \infty < t < \infty$, what is the distribution of $X$? [10] DeGroot, section 5.6 If a random sample of 25 observations is taken from the normal distribution with mean $\mu$ and standard deviation 2, what is the probability that the sample mean will lie within one unit of $\mu$? [14] DeGroot, section 5.6 Suppose that on a certain examination in advanced mathematics students from university $A$ achieve scores that are normally distributed with a mean of 625 and a variance of 100, and students from university $B$ achieve scores which are normally distributed with a mean of 600 and a variance of 150. If two students from university $A$ and three students from university $B$ take this examination, what is the probability that the average of the scores of the two students from university $A$ will be greater than the average of the scores of the three students from university $B$? *Hint:* Determine the distribution of the difference between the two averages. [16] DeGroot, section 5.6 Suppose that the joint p.d.f. of two random variables $X$ and $Y$ is $$f(x,y) = \frac{1}{2 \pi} e^{-(1/2)(x^2 + y^2)} \, \hbox{ for } -\infty < x < \infty, \, -\infty < y < \infty .$$ Find $P(-\sqrt{2} < X + Y < 2 \sqrt{2} )$. *Hint:* Determine the distribution of $X$ and $Y$ separately, then figure out the distribution of their sum. [R] Write a program to carry out the following two experiments. Code example below. (a) A fair coin is tossed 100 times and the number of heads that turn up is recorded. This experiment is then repeated 1000 times. * Have your program plot a histogram (`hist`, use `freq=FALSE`) for the number of heads (in each of the 1000 experiments). * Plot the *appropriate* normal density (use `dnorm`) curve on top of the histogram. Does the histogram look as though it can be fit with a normal curve? * Using the empirical rule, check to see if your experimental observations are consistent with the normal distribution (68% within 1 st dev, 95% within 2 st dev, 99.7% within 3 st dev). (b) Write a program that picks a random number between 0 and 1 and computes the negative of its logarithm. * Repeat the process 1000 times and plot a histogram of the observed values. * Plot the following density curve on top of the histogram. Does this histogram look as though it roughly fits the density? $$f_X(x) = e^{-x} \ \ \ \ x > 0$$ * Using three different intervals (any three you choose) for the random variable you generated, check to see that the density above gives probabilities that provide a good fit for the observed data. ```{r fig.height=3} nreps = 1000 mysamp = runif(nreps,0,1) notauniffunc = function(x){ x^2 } possiblevals = seq(0,1,by=0.1) possiblevals notauniffunc(possiblevals) hist(mysamp, freq=FALSE) lines(possiblevals, notauniffunc(possiblevals), col="red") #checking probabilites, I should get close to 0.2 sum(mysamp < 0.4)/nreps - sum(mysamp < 0.2)/nreps ```