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

please help, I need as clear solution for this, I will rate ASAP ! This activity

ID: 3822868 • Letter: P

Question

please help, I need as clear solution for this, I will rate ASAP !

This activity uses a 3rd party app. Though your activity may be recorded, a refresh may be required to update the banner to the left. function maleTallerHeight = EstimateTallMales(thresholdHeight) % EstimateTallMales: Estimate number of U.S. males taller than input height. % Inputs: thresholdHeight - height threshold % Outputs: maleTallerHeight - estimated number of U.S. males taller than % threshold height maleHeightMean =69.3; % (in.) maleHeightStdDev =6.01; % (in.) maleUSpopulation = 119.4; % millions % Initialize random number generator rng('default'); % Assign maleHeightSample with 1000000 normally distributed samples with % mean maleHeightMean and standard deviation maleHeightStdDev maleHeightSample =1; % FIXME % Assign percentageTaller with the percentage of samples in maleHeightSample % taller than thresholdHeight percentageTaller = 0.10; % FIXME % Assign maleTallerHeight with an estimate of the number of US males taller % than thresholdHeight by multiplying maleUSpopulation with percetangeTaller maleTallerHeight =1; % FIXME

Explanation / Answer

I am not retyping comments, so please copy them. Here is the solution.

function maleTallerHeight = EstimateTallMales( thresholdHeight )

maleHeightMean = 69.3;
maleHeightStdDev = 6.01;
maleUSpopulation = 119.4;
  
rng('default');
  
maleHeightSample = normrnd(maleHeightMean, maleHeightStdDev, 10000, 1);
  
percentageTaller = (sum(maleHeightSample > thresholdHeight))/10000;
  
maleTallerHeight = maleUSpopulation*percentageTaller;
end