$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 4.2E: Exercises

###### Exercise $$\PageIndex{1}$$

Pick a point $$x$$ at random (with uniform density) in the interval $$[0,1]$$. Find the probability that $$x > 1/2$$, given that

1. $$x > 1/4$$.

2. $$x < 3/4$$.

3. $$|x - 1/2| < 1/4$$.

4. $$x^2 - x + 2/9 < 0$$.

###### Exercise $$\PageIndex{2}$$

A radioactive material emits $$\alpha$$-particles at a rate described by the density function $f(t) = .1e^{-.1t}\ .$ Find the probability that a particle is emitted in the first 10 seconds, given that

1. no particle is emitted in the first second.

2. no particle is emitted in the first 5 seconds.

3. a particle is emitted in the first 3 seconds.

4. a particle is emitted in the first 20 seconds.

###### Exercise $$\PageIndex{3}$$

The Acme Super light bulb is known to have a useful life described by the density function $f(t) = .01e^{-.01t}\ ,$ where time $$t$$ is measured in hours.

1. Find the failure rate of this bulb (see Exercise [sec 2.2].[exer 2.2.6]).

2. Find the reliability of this bulb after 20 hours.

3. Given that it lasts 20 hours, find the probability that the bulb lasts another 20 hours.

4. Find the probability that the bulb burns out in the forty-first hour, given that it lasts 40 hours.

###### Exercise $$\PageIndex{4}$$

Suppose you toss a dart at a circular target of radius 10 inches. Given that the dart lands in the upper half of the target, find the probability that

1. it lands in the right half of the target.

2. its distance from the center is less than 5 inches.

3. its distance from the center is greater than 5 inches.

4. it lands within 5 inches of the point $$(0,5)$$.

###### Exercise $$\PageIndex{5}$$

Suppose you choose two numbers $$x$$ and $$y$$, independently at random from the interval $$[0,1]$$. Given that their sum lies in the interval $$[0,1]$$, find the probability that

1. $$|x - y| < 1$$.

2. $$xy < 1/2$$.

3. $$\max\{x,y\} < 1/2$$.

4. $$x^2 + y^2 < 1/4$$.

5. $$x > y$$.

###### Exercise $$\PageIndex{6}$$

Find the conditional density functions for the following experiments.

1. A number $$x$$ is chosen at random in the interval $$[0,1]$$, given that $$x > 1/4$$.

2. A number $$t$$ is chosen at random in the interval $$[0,\infty)$$ with exponential density $$e^{-t}$$, given that $$1 < t < 10$$.

3. A dart is thrown at a circular target of radius 10 inches, given that it falls in the upper half of the target.

4. Two numbers $$x$$ and $$y$$ are chosen at random in the interval $$[0,1]$$, given that $$x > y$$.

###### Exercise $$\PageIndex{7}$$

Let $$x$$ and $$y$$ be chosen at random from the interval $$[0,1]$$. Show that the events $$x > 1/3$$ and $$y > 2/3$$ are independent events.

###### Exercise $$\PageIndex{8}$$

Let $$x$$ and $$y$$ be chosen at random from the interval $$[0,1]$$. Which pairs of the following events are independent?

1. $$x > 1/3$$.

2. $$y > 2/3$$.

3. $$x > y$$.

4. $$x + y < 1$$.

###### Exercise $$\PageIndex{9}$$

Suppose that $$X$$ and $$Y$$ are continuous random variables with density functions $$f_X(x)$$ and $$f_Y(y)$$, respectively. Let $$f(x, y)$$ denote the joint density function of $$(X, Y)$$. Show that $\int_{-\infty}^\infty f(x, y)\, dy = f_X(x)\ ,$ and $\int_{-\infty}^\infty f(x, y)\, dx = f_Y(y)\ .$

###### Exercise $$\PageIndex{10}$$

In Exercise [sec 2.2].[exer 2.2.13] you proved the following: If you take a stick of unit length and break it into three pieces, choosing the breaks at random (i.e., choosing two real numbers independently and uniformly from [0, 1]), then the probability that the three pieces form a triangle is 1/4. Consider now a similar experiment: First break the stick at random, then break the longer piece at random. Show that the two experiments are actually quite different, as follows:

1. Write a program which simulates both cases for a run of 1000 trials, prints out the proportion of successes for each run, and repeats this process ten times. (Call a trial a success if the three pieces do form a triangle.) Have your program pick $$(x,y)$$ at random in the unit square, and in each case use $$x$$ and $$y$$ to find the two breaks. For each experiment, have it plot $$(x,y)$$ if $$(x,y)$$ gives a success.

2. Show that in the second experiment the theoretical probability of success is actually $$2\log 2 - 1$$.

###### Exercise $$\PageIndex{11}$$

A coin has an unknown bias $$p$$ that is assumed to be uniformly distributed between 0 and 1. The coin is tossed $$n$$ times and heads turns up $$j$$ times and tails turns up $$k$$ times. We have seen that the probability that heads turns up next time is $\frac {j + 1}{n + 2}\ .$ Show that this is the same as the probability that the next ball is black for the Polya urn model of Exercise 1.1.[exer 4.1.18]. Use this result to explain why, in the Polya urn model, the proportion of black balls does not tend to 0 or 1 as one might expect but rather to a uniform distribution on the interval $$[0,1]$$.

###### Exercise $$\PageIndex{12}$$

Previous experience with a drug suggests that the probability $$p$$ that the drug is effective is a random quantity having a beta density with parameters $$\alpha = 2$$ and $$\beta = 3$$. The drug is used on ten subjects and found to be successful in four out of the ten patients. What density should we now assign to the probability $$p$$? What is the probability that the drug will be successful the next time it is used?

###### Exercise $$\PageIndex{13}$$

Write a program to allow you to compare the strategies play-the-winner and play-the-best-machine for the two-armed bandit problem of Example [exam 4.17]. Have your program determine the initial payoff probabilities for each machine by choosing a pair of random numbers between 0 and 1. Have your program carry out 20 plays and keep track of the number of wins for each of the two strategies. Finally, have your program make 1000 repetitions of the 20 plays and compute the average winning per 20 plays. Which strategy seems to be the best? Repeat these simulations with 20 replaced by 100. Does your answer to the above question change?

###### Exercise $$\PageIndex{14}$$

Consider the two-armed bandit problem of Example [exam 4.17]. Bruce Barnes proposed the following strategy, which is a variation on the play-the-best-machine strategy. The machine with the greatest probability of winning is played the following two conditions hold: (a) the difference in the probabilities for winning is less than .08, and (b) the ratio of the number of times played on the more often played machine to the number of times played on the less often played machine is greater than 1.4. If the above two conditions hold, then the machine with the smaller probability of winning is played. Write a program to simulate this strategy. Have your program choose the initial payoff probabilities at random from the unit interval $$[0,1]$$, make 20 plays, and keep track of the number of wins. Repeat this experiment 1000 times and obtain the average number of wins per 20 plays. Implement a second strategy—for example, play-the-best-machine or one of your own choice, and see how this second strategy compares with Bruce’s on average wins.