Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The sample data has the following format: data$u - sample u; data$v - sample v. Create variable joint_distribution- matrix of joint distribution P[u,v]. Create variable
The sample data has the following format:
data$u - sample u; data$v - sample v.
- Create variable joint_distribution- matrix of joint distribution P[u,v].
- Create variable u_Marginal equal to the marginal distribution P[u].
- Create variable v_Marginal equal to the marginal distribution P[v].
- Create variable u_Conditional_v equal to the vector of conditional probabilities P[u|v=4].
- Create variable v_Conditional_u equal to the vector of conditional probabilities P[v|u=3].
Collect all results in variable res:
res <-list(Joint_distribution=joint_distribution, u_Marginal = u_Marginal, v_Marginal = v_Marginal, u_Conditional_v = u_Conditional_v, v_Conditional_u = v_Conditional_u )
u "v" | |
2 3 | |
2 3 | |
2 2 | |
1 2 | |
1 2 | |
1 2 | |
1 3 | |
3 2 | |
2 3 | |
2 3 | |
2 3 | |
1 3 | |
2 2 | |
2 2 | |
2 3 | |
1 4 | |
1 2 | |
1 4 | |
2 4 | |
2 2 | |
2 2 | |
2 3 | |
2 3 | |
1 3 | |
1 3 | |
2 1 | |
2 3 | |
3 2 | |
1 2 | |
1 3 | |
1 4 | |
1 2 | |
1 4 | |
3 3 | |
2 3 | |
2 3 | |
1 2 | |
3 3 | |
2 3 | |
1 2 | |
1 4 | |
1 2 | |
1 3 | |
2 2 | |
1 3 | |
3 2 | |
3 3 | |
1 2 | |
2 2 | |
1 4 | |
2 3 | |
1 3 | |
2 2 | |
2 3 | |
1 4 | |
1 1 | |
1 3 | |
3 2 | |
1 4 | |
2 4 | |
1 2 | |
1 4 | |
2 3 | |
3 3 | |
1 1 | |
2 2 | |
1 4 | |
1 2 | |
1 4 | |
1 4 | |
2 3 | |
1 4 | |
1 3 | |
2 3 | |
3 2 | |
3 2 | |
1 3 | |
2 4 | |
2 3 | |
1 3 | |
2 3 | |
1 2 | |
2 2 | |
3 3 | |
2 4 | |
1 3 | |
2 2 | |
2 2 | |
1 4 | |
3 1 | |
1 4 | |
1 3 | |
1 4 | |
1 2 | |
1 1 | |
1 3 | |
2 4 | |
3 3 | |
2 4 | |
1 1 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started