Exact probability of a triangular distribution
Ältere Kommentare anzeigen
How can I find exact probability of triangular distribution? Actually my exact question is: use simulation to estimate the probability that a triangular random variable is greater than its mean. You can take the parameters of the triangular random variable as follows: the minimum value as the sum of last digits of IDs of your group members, the mode value as the sum of the last two digits of of IDs of your group members and the maximum value as the sum of the last three digits of of IDs of your group members. Please, perform the simulation 1000 times and compare the estimated probability with the exact one. But I could not find the exact probabilty?
parameters = [31 56 75];
lower = min(parameters);
peak = median(parameters);
upper = max(parameters);
pd = makedist('Triangular','a',lower,'b',peak,'c',upper)
x = 0:.1:230;
y = pdf(pd,x);
plot(x,y)
title('Triangular Distribution')
xlim([0 100])
rng('default'); % For reproducibility
r = random(pd,1000,1)
sort_time = sort(time,'descend');
secondLargest = sort_time(2);
figure
pd2 = makedist('Triangular','a',lower,'b',peak,'c',secondLargest);
y2 = pdf(pd2,x);
plot(x,y2,'LineWidth',2)
title('Triangular Distribution')
xlim([0 100])
rng('default'); % For reproducibility
r2 = random(pd2,1000,1)
I transferred the random numbers I produced in Matlab to Excel.

3 Kommentare
Rik
am 6 Apr. 2020
This sounds like homework. Is it?
Burhan Elaldi
am 6 Apr. 2020
Burhan Elaldi
am 6 Apr. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Random Number Generation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!