---
title: "A08 Continuous Random Variables (100 points)"
author: "TYPE YOUR NAME HERE"
date: "TYPE DATE HERE"
format: docx
editor: visual
fig-height: 3
---

```{r}
#| message: false
#| warning: false
#| echo: false
library(tidyverse)
library(latex2exp)
```

## Instructions

Complete each exercise either in this qmd file or on paper. Include your name as the author and the date completed in the YAML code at the top of this file, and replace the first sentence in the Acknowledgements section as directed. Any parts completed on paper should either (a) be handed to David Housman, (b) placed in SC 117, or (c) scanned into a pdf file. This qmd file should be rendered to an html, docx, or pdf file. Zip together all relevant files: Rproj, qmd, rendered file, any data or image files, and (optionally) the pdf file containing your answers completed on paper. Upload the zip file in Moodle. Points will be taken off if these instructions are not followed.

## Acknowledgements

Replace this sentence with either (1) an acknowledgment of any person who gave you assistance and/or any resource that was used, or (2) a statement that you did not use any outside assistance.

By submitting this assignment, the author attests to abiding by the *Collaboration and Academic Integrity* policy stated in the course syllabus.

## Exercise 1 (15 points)

The life $X$ in years of a car voltage regulator has the pdf $f(x) = \dfrac{3}{7^3} x^2 e^{-(x/7)^3}, 0 \leq x < \infty$.

a.  (5 points) Graph the pdf over an appropriate domain. Include appropriate labels.

b.  (5 points) What is the probability that this regulator will last at least 7 years?

c.  (5 points) Given that it has lasted at least 7 years, what is the conditional probability that it will last at least another 3.5 years?

## Exercise 2 (35 points)

Suppose that the pdf of the life (in weeks) of a widget is of the form $f(x) = a x^2, 0 \leq x < 200$.

a.  (5 points) Find $a$.

b.  (5 points) Find and graph the cdf. Include appropriate labels.

c.  (5 points) Find the probability that a widget will fail within the first 100 weeks.

d.  (5 points) Find the mean time until widget failure.

e.  (5 points) To increase the lifetime of the system, three independent widgets are placed in parallel so that all must fail if the system is to fail. Find the probability that three widgets will fail within 100 weeks.

f.  (10 points) Find the mean time until three widgets fail,

## Exercise 3 (40 points)

Consider the following piecewise linear graphical model of the distribution of grades given in a course.

![](A08_Grades_pdf.png)

a.  (5 points) Determine the pdf as a symbolic expression.

b.  (15 points) Find the mean, standard deviation, and median.

c.  (5 points) Mark the pdf graph with $\mu$, $\mu \pm \sigma$, and $\mu \pm 2\sigma$.

d.  (15 points) Find the probabilities of being within one, two, and three standard deviations from the mean, and compare with the empirical rule.

## Exercise 4 (10 points)

Suppose $X$ is a continuous random variable with probability density function $f$. Prove $E[(X - \mu)^2] = E[X^2] - E[X]^2$. Use the definition of expectation for a continuous random variable and properties of definite integrals.
