A study is to be conducted to evaluate the efficacy of multiple doses of a particular COVID-19 vaccine. Letting X denote the number of vaccines that a randomly selected individual in the population has received, and Y denote an indicator variable indicating if the invidiual contracted COVID-19 (Y = 1 is “yes", and Y = 0 is “no"), an expert has modelled the joint probability function of X and Y as follows: f(x, y) 1 2 3 0.027 0.15 0.63 0.002 1 0.12 0.06 0.011 a) Find the marginal distribution of X, and the marginal distribution of Y. Determine, and justify, whether or not X and Y are independent random variables. b) Calculate the probability that the randomly selected individual will have contracted COVID-19 and received at least one dose of the vaccine. c) Calculate the probability that, given the individual has not contracted COVID-19, they received at least one dose of the vaccine. d) Calculate the covariance and correlation between X and Y. e) Using R, follow the following steps to simulate from the joint distribution of X and Y: i. Set the seed to your student ID and draw 100,000 observations from a continuous Uniform(0,1) distribution. ii. Use the following rule to transform each of your Uniform(0,1) observations into a sampled value from the joint distribution of X and Y. Store your sample in a data frame with 100,000 rows and 2 columns, one column for X and one for Y. Print the first 8 rows of your data frame. Rule: If U(0,1) observation is in [0, 0.027], then X = 0 and Y = 0 If U(0,1) observation is in (0.027,0.177], then X = 1 and Y = 0 If U(0,1) observation is in (0.177,0.807], then X = 2 and Y = 0 If U(0,1) observation is in (0.807,0.809], then X = 3 and Y = 0 If U(0,1) observation is in (0.809, 0.929], then X = 0 and Y = 1 If U(0,1) observation is in (0.929,0.989], then X = 1 and Y = 1 If U(0,1) observation is in (0.989, 1], then X = 2 and Y = 1 iii. Explain in words why the rule in ii. makes sense (no R required here). iv. Apply the R function called “table" to your data frame. This will give you the frequencies of each (X,Y) value. Then, check and comment on the relative frequencies of (X,Y) in your sample, including a comparison to the frequency expected based on the true joint distribution of (X,Y). v. Calculate the proportion of your sampled (X,Y) values for which the individualsrecieved at least 1 vaccine (X > 1) and contracted COVID (Y = 1). Compare with your answer in b). vi. Use the function "cor" in R to calculate the sample correlation between the simulated X and Y values, and compare to the value calculated in part d).

A First Course in Probability (10th Edition)
10th Edition
ISBN:9780134753119
Author:Sheldon Ross
Publisher:Sheldon Ross
Chapter1: Combinatorial Analysis
Section: Chapter Questions
Problem 1.1P: a. How many different 7-place license plates are possible if the first 2 places are for letters and...
icon
Related questions
Question

Use Student Id: 12345678 

A study is to be conducted to evaluate the efficacy of multiple doses of a particular COVID-19 vaccine.
Letting X denote the number of vaccines that a randomly selected individual in the population has received,
and Y denote an indicator variable indicating if the invidiual contracted COVID-19 (Y = 1 is “yes", and
Y = 0 is “no"), an expert has modelled the joint probability function of X and Y as follows:
f (x, y)
X
1
2
3
Y
0.027
0.15
0.63
0.002
1
0.12
0.06
0.011
a) Find the marginal distribution of X, and the marginal distribution of Y. Determine, and justify,
whether or not X and Y are independent random variables.
b) Calculate the probability that the randomly selected individual will have contracted COVID-19 and
received at least one dose of the vaccine.
c) Calculate the probability that, given the individual has not contracted COVID-19, they received at
least one dose of the vaccine.
d) Calculate the covariance and correlation between X and Y.
e) Using R, follow the following steps to simulate from the joint distribution of X and Y:
i. Set the seed to your student ID and draw 100,000 observations from a continuous Uniform(0,1)
distribution.
ii. Use the following rule to transform each of your Uniform(0,1) observations into a sampled value from
the joint distribution of X and Y. Store your sample in a data frame with 100,000 rows and 2 columns,
one column for X and one for Y. Print the first 8 rows of your data frame.
Rule:
If U(0,1) observation is in [0,0.027), then X = 0 and Y
= 0
%3D
If U(0,1) observation is in (0.027,0.177], then X = 1 and Y = 0
If U(0,1) observation is in (0.177, 0.807], then X = 2 and Y = 0
If U(0,1) observation is in (0.807, 0.809], then X
- 3 and Y = 0
If U(0,1) observation is in (0.809, 0.929], then X = 0 and Y =1
If U(0,1) observation is in (0.929, 0.989], then X =1 and Y = 1
If U(0,1) observation is in (0.989, 1], then X = 2 and Y = 1
iii. Explain in words why the rule in ii. makes sense (no R required here).
iv. Apply the R function called "table" to your data frame. This will give you the frequencies of each
(X,Y) value. Then, check and comment on the relative frequencies of (X,Y) in your sample, including a
comparison to the frequency expected based on the true joint distribution of (X,Y).
v. Calculate the proportion of your sampled (X,Y) values for which the individualsrecieved at least 1
vaccine (X > 1) and contracted COVID (Y = 1). Compare with your answer in b).
vi. Use the function "cor" in R to calculate the sample correlation between the simulated X and Y values,
and compare to the value calculated in part d).
Transcribed Image Text:A study is to be conducted to evaluate the efficacy of multiple doses of a particular COVID-19 vaccine. Letting X denote the number of vaccines that a randomly selected individual in the population has received, and Y denote an indicator variable indicating if the invidiual contracted COVID-19 (Y = 1 is “yes", and Y = 0 is “no"), an expert has modelled the joint probability function of X and Y as follows: f (x, y) X 1 2 3 Y 0.027 0.15 0.63 0.002 1 0.12 0.06 0.011 a) Find the marginal distribution of X, and the marginal distribution of Y. Determine, and justify, whether or not X and Y are independent random variables. b) Calculate the probability that the randomly selected individual will have contracted COVID-19 and received at least one dose of the vaccine. c) Calculate the probability that, given the individual has not contracted COVID-19, they received at least one dose of the vaccine. d) Calculate the covariance and correlation between X and Y. e) Using R, follow the following steps to simulate from the joint distribution of X and Y: i. Set the seed to your student ID and draw 100,000 observations from a continuous Uniform(0,1) distribution. ii. Use the following rule to transform each of your Uniform(0,1) observations into a sampled value from the joint distribution of X and Y. Store your sample in a data frame with 100,000 rows and 2 columns, one column for X and one for Y. Print the first 8 rows of your data frame. Rule: If U(0,1) observation is in [0,0.027), then X = 0 and Y = 0 %3D If U(0,1) observation is in (0.027,0.177], then X = 1 and Y = 0 If U(0,1) observation is in (0.177, 0.807], then X = 2 and Y = 0 If U(0,1) observation is in (0.807, 0.809], then X - 3 and Y = 0 If U(0,1) observation is in (0.809, 0.929], then X = 0 and Y =1 If U(0,1) observation is in (0.929, 0.989], then X =1 and Y = 1 If U(0,1) observation is in (0.989, 1], then X = 2 and Y = 1 iii. Explain in words why the rule in ii. makes sense (no R required here). iv. Apply the R function called "table" to your data frame. This will give you the frequencies of each (X,Y) value. Then, check and comment on the relative frequencies of (X,Y) in your sample, including a comparison to the frequency expected based on the true joint distribution of (X,Y). v. Calculate the proportion of your sampled (X,Y) values for which the individualsrecieved at least 1 vaccine (X > 1) and contracted COVID (Y = 1). Compare with your answer in b). vi. Use the function "cor" in R to calculate the sample correlation between the simulated X and Y values, and compare to the value calculated in part d).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
A First Course in Probability (10th Edition)
A First Course in Probability (10th Edition)
Probability
ISBN:
9780134753119
Author:
Sheldon Ross
Publisher:
PEARSON
A First Course in Probability
A First Course in Probability
Probability
ISBN:
9780321794772
Author:
Sheldon Ross
Publisher:
PEARSON