---
title: "Ch 3.3 Practice: Functions of Random variables, and the Variance"
author: "Your name here"
output: pdf_document
---



# 1. Let $X$ be a discrete random variable with pmf given by 
P(X=0)=1/4, P(X=1)=1/2, P(X=2)=1/8, P(X=3)=1/8

## a. Find the pmf of $Y=X-1$.


## b. Find the theoretical pmf of $V=(X-1)^{2}$.
Note that there are two ways to get V = 1, so the pmf needs to be simplified. 

## c. Calculate the theoretical values for $E(V)$ and $Var(V)$. 


## d. Estimate $E(V)$ and $Var(V)$ using simulation. 



\newpage
# 2. Let $X$ and $Y$ be random variables such that $E[X]=2$ and $E[Y]=3$. Answer the following questions and show your work using equations not just numbers.  

## a. Find $E[4X+5Y]$.



## b. Find $E[4X-5Y+2]$.




\newpage

# 3. Roll two ordinary dice and let $X$ be their sum. 

## a. Compute the pmf for $X$. Hint: Use simulation to calculate the pmf of the sum of two dice using the `proportions()` function, then save the result of that pmf as a new object `p.x`



## b. Compute the theoretical mean and standard deviation of $X$. 



## c. Confirm your result for the mean and standard deviation using simulation. 


\newpage
# 4. Let $X$ be a random variable with mean $\mu$ and standard deviation $\sigma$. Use the properties of the variance to find the mean and standard deviation of $\frac{X-\mu}{\sigma}$.

