---
title: "Math 151 - Probability Theory - Homework 6"
author: "your name here"
date: "Due: not ever due"
output: pdf_document
---
## Important Note:
You should work to turn in assignments that are clear, communicative, and concise. Part of what you need to do is not print pages and pages of output. Additionally, you should remove these exact sentences and the information about HW scoring below.
Click on the *Knit to PDF* icon at the top of R Studio to run the R code and create a PDF document simultaneously. [PDF will only work if either (1) you are using R on the network, or (2) you have LaTeX installed on your computer. Lightweight LaTeX installation here: https://yihui.name/tinytex/]
> Either use the college's RStudio server (https://rstudio.pomona.edu/)
or install R and R Studio on to your personal computer.
See: https://research.pomona.edu/johardin/math151f20/ for resources.
```{r warning=FALSE, comment=FALSE, message=FALSE, echo = FALSE}
knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.height=3, fig.width=5,
fig.align = "center")
```
### Assignment
#### 1: PodQ
Describe one thing you learned from someone in your pod this week (it could be: content, logistical help, background material, R information, etc.) 1-3 sentences.
#### 2: 3.4.4
Suppose that $X$ and $Y$ have a continuous joint distribution for which the joint p.d.f. is:
$$f(x,y) = \begin{cases} cy^2 & 0 \le x \le 2, \, 0 \le y \le 1 \\ 0 & \hbox{ otherwise } \end{cases}$$
Determine:
a. the value of the constant, $c$
b. $P(X + Y > 2)$
c. $P(Y < 1/2)$
d. $P(X \le 1)$
e. $P(X = 3Y)$
#### 3: 3.4.5
Suppose that the joint pdf of two random variables X and Y is as follows:
$$f(x) = \begin{cases} c(x^2 + y) & 0 \leq y \leq 1-x^2 \\ 0 & \mbox{else} \end{cases} $$
Determine:
a. the value of the constant $c$
b. $P(0 \leq X \leq 1/2)$
c. $P(Y \leq X+1)$
d. $P(Y = X^2)$
Hint: Draw a picture of a parabola!!!
#### 4: 3.4.7
Suppose that a point $(X,Y)$ is to be chosen from the square $S$ in the $xy-$plane containing all points $(x,y)$ such that $0\leq x \leq 1$ and $0\leq y \leq 1$. Suppose that the probability that the chosen point will be in the corner (0,0) is 0.1, the probability that it will be the corner (1,0) is 0.2, the probability that it will be the corner (0,1) is 0.4, and the probability that it will be the corner (1,1) is 0.1. Suppose also that if the chosen point is not one of the four corners of the square, then it will be an interior point of the square and will be chosen according to a constant pdf over the interior of the square. Determine
a. $P(X \leq 1/4)$
b. $P(X+Y \leq 1)$
#### 5: 3.4.10
Let $Y$ be the rate (calls per hour) at which calls arrive at a switchboard. Let $X$ be
the number of calls during a two-hour period. A popular choice of joint pf/pdf for $(X,Y)$ in this example would be one like
$$f(x,y) = \begin{cases} \frac{(2y)^x}{x!} e^{-3y} & \hbox{ if } y > 0, x = 0, 1, 2, \dots \\
0 & \hbox{ otherwise } \end{cases} $$
a. Verify that $f$ is a joint pf/pdf.
Hint: First, sum over the $x$ values using the well-known formula for the power series expansion of $e^{2y}$.
b. Find $P(X = 0)$.
#### 6: 3.4.11
Consider the clinical trial of depression drugs in example 2.1.4. Suppose that a patient is selected at random from the 150 patients in that study and we record Y, an indicator of the treatment group for that patient, and X, an indicator of whether or not the patient relapsed. Table 3.3 contains the joint pf of X and Y.
a. Calculate the probability that a patient selected at random from this study used Lithium (either alone or in combination with Imipramine) and did not relapse.
b. Calculate the probability that the patient had a relapse (without regard to the treatment group).
#### 7: Additional Problem 1
Two points are selected randomly on a line of length $L$ so as to be on opposite sides of the midpoint of the line. [In other words, the two points $X$ and $Y$ are independent random variables such that $X$ is uniformly distributed over $(0,L/2)$ and $Y$ is uniformly distributed over $(L/2, 1)$.] Find the probability that the distance between the two points is greater than $L/3$.
#### 8: Additional Problem 2
In the previous problem, find the probability that the 3 line segments from $0$ to $X$, from $X$ to $Y$, and from $Y$ to $L$ could be made to form the three sides of a triangle. (Note that three line segments can be made to form a triangle if the length of each of them is less than the sum of the lengths of the others.)