Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how can you join two pmfs into one? I am writing a MATLAB program and need help

ID: 3176298 • Letter: H

Question

how can you join two pmfs into one?


I am writing a MATLAB program and need help for this. Can you answer this question for the pmfs in my picture? I know that for x= 6, the probability must be higher than the others (because separately one is already higher, and x=6 is included in both pmfs). And I also know that the total probability of each value in the pmf must add up to 1. Beyond this, I have no clue how to solve it. Make absolute sure your answer is right, because otherwise my program will end up completely wrong. Thanks!



yVJ ) 6'6'- ,sv'11. 7e7xcA "v

Explanation / Answer

Here , in the code below you have to give the number of sample points and fill the values of known probability one by one.. for the unknown it will be stored in 'ans' variable in the code.

prompt = 'what is the total number of sample space points?'

n = input(prompt)
#str = input(prompt,'s')
k=0;
x=0;
for (i=1:1:n-1)
fprintf('%i ', x)
prompt1 = 'enter the probability '
x(i) = input(prompt1);
k=x(i) + k;
end

ans = 1-k