Simulate two Normally distributed random variables X1 and X2 with correlation 0.8, both should have a mean value of 70 and a standard deviation of 8. equation 5.3.2 for formulas that will help you see how to do the simulation. There are other ways to do this as well. Think of X2 as a score on the second test in a class, and X1 as the score on the first exam. a. Analytically find the expected value and variance of `Change = X2 - X1`. b. Use a simulation with n=1000 to find the mean and variance of `Change` using simulation. c. Plot your simulated data on a scatterplot. d. Also plot X1 vs. Change. e. How might regression to the mean cause issues in assessing whether or not a student improved or did worse on the second test compared to the first?

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

Simulate two Normally distributed random variables X1 and X2 with correlation 0.8, both should have a mean value of 70 and a standard deviation of 8. equation 5.3.2 for formulas that will help you see how to do the simulation. There are other ways to do this as well. Think of X2 as a score on the second test in a class, and X1 as the score on the first exam.

a. Analytically find the expected value and variance of `Change = X2 - X1`.

b. Use a simulation with n=1000 to find the mean and variance of `Change` using simulation.

c. Plot your simulated data on a scatterplot.

d. Also plot X1 vs. Change.

e. How might regression to the mean cause issues in assessing whether or not a student improved or did worse on the second test compared to the first?

## 5.3.2 Bivariate Normal Distribution

The normal distribution plays a critical role in probability theory and is widely used across various applications. We've previously discussed a single normal random variable, and now we expand to two or more normal random variables. As seen in Theorem 5.2, the sum of two independent normal random variables is also normal. However, when the two normal random variables are dependent, their sum may not be normal, as illustrated in the following counterexample:

### Example 5.35

Let \(X \sim N(0,1)\) and \(W \sim \text{Bernoulli}\left( \frac{1}{2} \right)\) be independent random variables. Define the random variable \(Y\) as a function of \(X\) and \(W\):

\[
Y = h(X,W) = 
\begin{cases} 
X & \text{if } W = 0 \\ 
-X & \text{if } W = 1 
\end{cases}
\]

Since \(N(0,1)\) is symmetric around zero, \(-X\) is also \(N(0,1)\). We can express:

\[
F_Y(y) = P(Y \leq y) = P(Y \leq y | W = 0)P(W = 0) + P(Y \leq y | W = 1)P(W = 1)
\]

This results in:

\[
= \frac{1}{2} P(X \leq y) + \frac{1}{2} P(-X \leq y)
\]

As \(X\) and \(-X\) are \(N(0,1)\):

\[
= \frac{1}{2}\Phi(y) + \frac{1}{2}\Phi(y) = \Phi(y)
\]

Hence, \(Y \sim N(0,1)\). Now consider:

\[
Z = X + Y = 
\begin{cases}
2X & \text{with probability } \frac{1}{2} \\
0 & \text{with probability } \frac{1}{2}
\end{cases}
\]

Thus, \(Z\) is a mixed random variable with its PDF given by:

\[
f_Z(z) = \frac{1}{2} \delta(z) +
Transcribed Image Text:## 5.3.2 Bivariate Normal Distribution The normal distribution plays a critical role in probability theory and is widely used across various applications. We've previously discussed a single normal random variable, and now we expand to two or more normal random variables. As seen in Theorem 5.2, the sum of two independent normal random variables is also normal. However, when the two normal random variables are dependent, their sum may not be normal, as illustrated in the following counterexample: ### Example 5.35 Let \(X \sim N(0,1)\) and \(W \sim \text{Bernoulli}\left( \frac{1}{2} \right)\) be independent random variables. Define the random variable \(Y\) as a function of \(X\) and \(W\): \[ Y = h(X,W) = \begin{cases} X & \text{if } W = 0 \\ -X & \text{if } W = 1 \end{cases} \] Since \(N(0,1)\) is symmetric around zero, \(-X\) is also \(N(0,1)\). We can express: \[ F_Y(y) = P(Y \leq y) = P(Y \leq y | W = 0)P(W = 0) + P(Y \leq y | W = 1)P(W = 1) \] This results in: \[ = \frac{1}{2} P(X \leq y) + \frac{1}{2} P(-X \leq y) \] As \(X\) and \(-X\) are \(N(0,1)\): \[ = \frac{1}{2}\Phi(y) + \frac{1}{2}\Phi(y) = \Phi(y) \] Hence, \(Y \sim N(0,1)\). Now consider: \[ Z = X + Y = \begin{cases} 2X & \text{with probability } \frac{1}{2} \\ 0 & \text{with probability } \frac{1}{2} \end{cases} \] Thus, \(Z\) is a mixed random variable with its PDF given by: \[ f_Z(z) = \frac{1}{2} \delta(z) +
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman