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

Use Matlab to calculate the probabilities in the following scenarios. Provide yo

ID: 3069287 • Letter: U

Question

Use Matlab to calculate the probabilities in the following scenarios. Provide your code as well as your answer.

Hint: You will find the following Matlab functions useful: normcdf(), normrnd()

(a) IQ tests are designed in such a way that the mean and standard deviation are equal to 100 and 15 respectively. What is the probability of having an IQ score of 130 or more?

(b) What is the probability of having an IQ between 110 and 130?

(c) Bolts for particular application are considered defective if their minimum tensile strength is less than 800Mpa. Two suppliers provide bolts with differing mean and variances. Supplier 1 provides bolts with a mean minimum tensile strength of 900Mpa and a standard deviation of 40Mpa. Supplier 2 provides bolts with a mean minimum tensile strength of 841Mpa and a standard deviation of 30Mpa. Which supplier will supply a greater proportion of defective bolts?

(d) Simulate in Matlab the scenario above involving minimum tensile strength of bolts by randomly generating bolts from each distribution and then observing what proportions are defective. Confirm your results in part (c).

Explanation / Answer

a.) P(iq >= 130) = 1 - P(iq < 130) = 1 - CDF_iq(130) = 1 - 0.9772 = 0.0228

b.) P(110 < iq < 130) = P(iq < 130) - P(iq < 110) = CDF_iq(130) - CDF_iq(110) = 0.9772 - 0.7703 = 0.2297

MATLAB Code for a & b

% a. P(iq >= 130) = 1- P(iq < 130)
P_a = 1 - normcdf(130, 100, 15);

%b. P(110 < iq < 130) = P(iq < 130) - P(iq < 110)
P_b = normcdf(130, 100, 15) - normcdf(110, 100, 15);

c.) for supplier 1, P(failure) = P_1(TS < 800) = CDF_1(800) = 0.0062

for supplier 2, P(failure) = P_2(TS < 800) = CDF_2(800) = 0.0859

=> P(failure for supplier 2) > P(failure for supplier 1) => supplier 2 produces a higher proportion of defective bolts

d.) from simulation, P_1(TS < 800) = 0.0043, P_2(TS < 800) = 0.0843 => P_2 > P_2

MATLAB Code for c & d

% c. P(TS < 800) = CDF(800)
P1_c = normcdf(800, 900, 40); % supplier 1
P2_c = normcdf(800, 841, 30); % supplier 2

% d.
rng('default') % for reproducibility
s1 = normrnd(900, 40, [10000, 1]); % simulation for supplier 1
s2 = normrnd(841, 30, [10000, 1]); % simulation for supplier 2

p1 = sum(s1 < 800)/size(s1, 1);
p2 = sum(s2 < 800)/size(s2, 1);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote