Sir James the Wise is a brave and noble knight. Each day he rides out with his s
ID: 3922371 • Letter: S
Question
Sir James the Wise is a brave and noble knight. Each day he rides out with his sword, lance, and shining armour to seek adventure in the halls of the Mathematics Department. On each day there is a 5% probability that Sir James will rescue a princess, there is a 2% probability that Sir James will slay a dragon, and a 93% probability that he simply has a cup of tea and goes home again without rescuing a princess or slaying a dragon. Write a Matlab script file to estimate the probability that Sir James slays 5 or more dragons in one year. In any given week, what is the probability that Sir James has a cup of tea more often than he rescues a princess? (Write a Matlab script file to compute this.)Explanation / Answer
% Clears the screen and deletes all the variables in the workspace
clc;
clear;
%finds the probability of slaying 5 or more dragons in one year
d = 5 * (2 / 365 );
%displays the probability
disp(d)
%finds the probability of having a cup of tea more often than to rescue a princess
t = 1 - abs(93 / 7) + abs (5/7);
disp(t)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.