Class 45
Between Class Sessions - Prep for Day 45
Please spend around 2 hours working between class sessions, focusing on the tasks below. Use any extra time to complete KnewtonAlta assignments and/or work on Project tasks.
Pick something from your prep today that you can share with your group in class. It might be something new that you learned. It might be questions you have that are still unanswered, or a question along with what helped you eventually answer it. It might be something tricky that you solved. It might be a review topic that helped you remember something. It might be a conversation you had with AI that was helpful. You will have a chance to share this with your peers during class. Come ready to articulate your thinking and questions.
Preparation
(1) CDF’s and PDF’s (Making Connections)
Let \(g(x)\) be a function that defines the top of a target. Each time we throw a dart, it hits a a random spot on the target. We let \(X\) be the random variable that records the \(x\)-coordinate of the dart’s location.
Calculating a PDF (from a nonnegative function with finite area)
Given a “target” function, \(g(x)\), there are two ways to calculate the probability density function, \(f\):
Method 1 - Calculate \(F(x) = P(X \leq x)\) for every real number \(x\). - Calculate probabilities as ratios of areas, \(P(X \leq x) = \frac{\int_{-\infty}^x g(t)dt}{\int_{-\infty}^\infty g(t)dt}\) - Take the derivative of the CDF to find the PDF, \(f(x) = F'(x)\).
Method 2 - Normalize the target so the total area will be 1. - Multiple \(g(x)\) by \(k = \frac{1}{\int_{-\infty}^\infty g(x) dx}\), to get \(f(x) = kg(x)\).
Calculating a CDF (from a nonnegative function with finite area)
Given a “target” function, \(g(x)\), there are two ways to calculate the cumulative distribution function, \(F\):
Method 1 - Normalize \(g(x)\) to find the PDF, \(f(x)\). - Multiple \(g(x)\) by \(k = \frac{1}{\int_{-\infty}^\infty g(x) dx}\). Pick \(k\) so that \(\int_{-\infty}^\infty f(x)dx = 1\). - Find the Antiderivative (“undo the derivative”) to find the CDF. - \(F(x) = \int_{-\infty}^x f(t)dt\)
Method 2 - Calculate \(F(x) = P(X \leq x)\) for every real number \(x\). - Calculate probabilities as ratios of areas, \(F(x) = P(X \leq x) = \frac{\int_{-\infty}^x g(t)dt}{\int_{-\infty}^\infty g(t)dt}\)
(2) Practice
Complete the following exercises, identifying which method from above you used. (Please use Mathematica as need to compute definite integrals.)
- Given the cumulative distribution function below, find the probability density function, \(f(x)\).
\(F(x) = \begin{cases}0 & x<0\\ \\ \frac{x^2}{9} & 0\leq x\leq 3\\ \\ 1 & x>3\end{cases}.\) - Given the probability density function below, find the cumulative distribution function, \(F(x)\).
\(f(x) = \begin{cases} 3-6x^2 & 0 \leq x \leq 1 \\ \\ 0 & \text{otherwise} \end{cases}.\) - Given the probability density function below, find the cumulative distribution function, \(F(x)\).
\(f(x) = \begin{cases} \frac{8}{7} - \frac{2}{7}x & 0 \leq x \leq 1 \\ \\ 0 & \text{otherwise} \end{cases}.\) - Given the nonnegative function below, find the cumulative distribution function.
\(g(x) = \begin{cases} \frac{1}{x^2} & x \geq 1 \\ \\ 0 & \text{otherwise} \end{cases}.\)
Given the nonnegative function below, find the cumulative distribution function, \(F(x)\).
\(g(x) = \begin{cases} e^{-\lambda x} & x \geq 0 \\ \\ 0 & \text{otherwise} \end{cases}.\)Given the cumulative distribution function below, find the probability density function, \(f(x)\).
\(F(x) = \begin{cases} 0 & x \leq 0 \\ \\ 1 - e^{-\lambda x} & x > 0 \\ \\ \end{cases}.\)
Regular Reminders
Skill Practice (KA Homework)
- Continue working on 3 – CDFs, PDFs, and the Fundamental Theorem of Calculus
- Complete any missing Function assignment, Derivative assignments, or any of the first 6 Integral assignments.
Applied Practice (Project Work)
- Review and submit Project 3.
During Class
Group Meeting
Teach One Another
Give each group member 1-2 minutes to share what they prepared from the between class work.
Work on the chalkboard as you complete these activities and exercises, and pass the chalk as you finish each one. Leave up your work so that you can compare your answers with your neighbors. If you notice an answer differs from a neighboring group’s, then have a discussion with them.
Fundamental Theorem of Calculus
Summary: Calculating Probability with the PDF and CDF
To calculate a probability with the PDF of a continuous random variable, we use the following:
- \(P(X \leq a) = \int_{-\infty}^a f(x)dx\),
- \(P(a \leq X \leq b) = \int_a^b f(x)dx\),
- \(P(X \geq a) = \int_a^\infty f(x)dx\).
To calculate a probability with the CDF of a continuous random variable, we use the following:
- \(P(X \leq a) = F(a)\)
- \(P(a \leq X \leq b) = F(b) - F(a)\)
- \(P(X \geq a) = 1 - F(a)\)
Fundamental Theorem of Calculus (FTC)
(Part 1) If \(f(x)\) is continuous over an interval \([ a, b ]\), and the function \(F(x)\) is defined by \(F(x) = \int_a^x f(t)dt\), then \(F'(x) = f(x)\) over \([ a, b ]\).
Note this is Theorem 5.4 in Open Stax Calculus Volume 1.
(Part 2) If \(f\) is continuous over the interval \([ a, b ]\) and \(F(x)\) is any antiderivative of \(f(x)\), then \(\int_a^b f(x)dx = F(b) - F(a)\).
Note this is Theorem 5.5 in Open Stax Calculus Volume 1. - When you read antiderivative think “undo a derivative”.
Let \(\ds f(x) = \begin{cases}\frac{1}{8}x & 3 \leq x \leq 5 \\0 & \text{otherwise}\end{cases}\) be a pdf for a continuous random variable \(X\).
- Calculate \(F(x) = P(X \leq x)\) by writing down an appropriate integral (an accumulation function) and then computing that integral with Mathematica. You have found the CDF of \(X\).
- Compute the derivative of \(F(x)\).
- Explain why \(\ds \frac{d}{dx}\left(\int_3^x\frac{1}{8}t dt\right) = \frac{1}{8}x\) for \(3\leq x\leq 5\).
- Compute \(P(3 \leq X \leq 4)\) using the probability density function \(f(x)\).
- Compute \(P(3 \leq X \leq 4)\) using the cumulative distribution function \(F(x)\).
- Verify that \(\int_3^4 f(x) dx = F(4)-F(3)\).
Let \(\ds f(x) = \begin{cases}\lambda e^{-\lambda x} & x \geq 0 \\ 0 & \text{otherwise}\end{cases}\) be a pdf for a continuous random variable \(X\), for some \(\lambda >0\).
- Calculate \(F(x) = P(X \leq x)\) by writing down an appropriate integral (an accumulation function)and then computing that integral with Mathematica. You have found the CDF of \(X\).
- Compute the derivative of \(F(x)\).
- Explain why \(\ds \frac{d}{dx}\left(\int_0^x\lambda e^{-\lambda t} dt\right) = \lambda e^{-\lambda x}\) for \(x \geq 0\).
- Compute \(P(1 \leq X \leq 5)\) using the probability density function \(f(x)\).
- Compute \(P(1 \leq X \leq 5)\) using the cumulative distribution function \(F(x)\).
- Verify that \(\int_1^5 f(x) dx = F(5)-F(1)\).
Let \(F(x) = \int_2^x \ln(t^4+5)\frac{3}{\ln(t^5)}dt\). Compute \(F'(x)\). (Check part 1 of the FTC if needed).
Let \(G(x) = \int_0^x \sqrt{5+e^{3t}}dt\). Compute \(G'(x)\). (Check part 1 of the FTC if needed).
Let \(h(x) = x^3\). Find an antiderivative of \(h\), and then use that antiderivative to compute \(\int_1^2 x^3dx\). Check your answer with Mathematica.
Compute \(\int \frac{2}{t^2} dt = \int 2t^{-2} dt\). (In other words find the collection of all antiderivatives of \(\frac{2}{t^2}\).)
Compute \(\int_1^2 \frac{2}{t^2} dt\).
Discussion
Summary - Random Variables (and the functions that describe them) – Key Ideas
- What is a difference between a discrete and continuous random variable?
One Answer
- Continuous Random Variables take on values in an interval of real numbers.
- Note: \(P(X = x) = 0\) for every real number \(x\).
- Discrete Random Variables take on only a finite (or countably infinite) list of values.
- Note: \(P(X = x)\) is nonzero for some real numbers \(x\).
- What are two key characteristics of a probability density function of a continuous random variable?
One Answer
- The PDF \(f(x)\) is nonnegative for all real numbers (i.e. \(f(x) \geq 0\) for \(x \in \mathbb{R}\)).
- The total area under \(f\) above the \(x\)-axis is one (i.e. \(\int_{-\infty}^\infty f(x) dx = 1\)).
- Describe two ways to calculate the PDF of \(X\) given a CDF or a nonnegative function \(g(x)\).
Finding a PDF
- Take the derivative of the CDF to obtain \(f(x) = F'(x)\).
- The CDF is \(F(x) = P(X \leq x)\), and the pdf is \(f(x) = F'(x) = \diff{}{x}(\int_{-\infty}^x f(s)ds)\).
- Normalize a nonnegative function so the total area is one, e.g. \(f(x) = \frac{1}{\int_{-\infty}^\infty g(x) dx}g(x) = kg(x)\).
- Describe two ways to calculate the CDF of \(X\) given a nonnegative function \(g(x)\).
Finding a CDF
Calculate \(F(x) = P(X \leq x) = \frac{1}{\int_{-\infty}^\infty g(x) dx}\int_{-\infty}^x g(t)dt\).
Find the PDF, \(f(x)\), and undo the derivative to find \(F(x)\).
- \(F(x) = \int_{-\infty}^x f(s)ds\)
- Normalize a nonnegative function so the total area is one to find the PDF, e.g. \(f(x) = \frac{1}{\int_{-\infty}^\infty g(x) dx}g(x) = kg(x)\).
- \(F(x) = \int_{-\infty}^x f(s)ds\)
- Why do we call \(f(x)\) a probability density function?
One Explanation
Since \(f(x) = F'(x)\), we know \(f(x) = F'(x) = \lim_{\Delta x \rightarrow 0}\frac{F(a + \Delta x) - F(a)}{\Delta x}\) (this is the definition of derivative). Notice the right side of the equation \(\frac{F(a + \Delta x) - F(a)}{\Delta x}\) has units probability per length. Probability per length is a density, a probability density. So the function \(f(x)\) is called a probability density function.
Fundamental Theorem of Calculus (FTC)
(Part 1) If \(f(x)\) is continuous over an interval \([ a, b ]\), and the function \(F(x)\) is defined by \(F(x) = \int_a^x f(t)dt\), then \(F'(x) = f(x)\) over \([ a, b ]\).
Note this is Theorem 5.4 in Open Stax Calculus Volume 1.
(Part 2) If \(f\) is continuous over the interval \([ a, b ]\) and \(F(x)\) is any antiderivative of \(f(x)\), then \(\int_a^b f(x)dx = F(b) - F(a)\).
Note this is Theorem 5.5 in Open Stax Calculus Volume 1. - When you read antiderivative think “undo a derivative”.
Definition: Percentile
Let \(X\) be a random variable.
- A percentile is a number \(x_p\) that satisfies the equation \(P(X \leq x_p) = \frac{p}{100}\).
- This means \(x_p\) satisfies the equation \(F(x_p) = \frac{p}{100}\) where \(F(x)\) is the cumulative distribution function for \(X\).
- This means \(x_p\) satisfies the equation \(\int_{-\infty}^{x_p}f(t)dt = \frac{p}{100}\) where \(f(x)\) is the probability density function for \(X\).
- A percentile divides probability into 100 equal groups (per 100).
- A percentile is a number \(x_p\) such that \(p\)% of the probability is at or below this number.
Expected Value (continuous random variable)
The expected value (or mean) of a continuous random variable \(X\) with probability density function \(f(x)\) is
\(E[X] = \int_{-\infty}^{\infty} x f(x) dx\).
Variance (continuous random variable)
The variance of a continuous random variable \(X\) with probability density function \(f(x)\) is
\(Var[X] = \int_{-\infty}^{\infty} (x - E[X])^2 f(x) dx\).
Note: The standard deviation is equal to the square root of the variance, \(\sigma_X = \sqrt{Var[X]}\).
Source: Class.45 on byuimath.com