Estimating the number of US males taller than the average NBA player. To estimat
ID: 3822275 • Letter: E
Question
Estimating the number of US males taller than the average NBA player. To estimate the number of US males taller than thresholdHeight (inches): Assign le with 1000000 normally distributed samples with mean m an and standard deviation male HeightStdDev Assign percentage Taller with the percentage of samples in maleHeightSample taller than thresholdHeight Assign male TallerHeight with an estimate of the number of US males taller than thresholdHeight by multiplying maleUSpopulation with percetange Taller Your Function Save C Reset M MATLAB Documentation 1 function maleTallerHeight Estimate TallMales threshold Height) 2 Estimate TallMales: Estimate number of U.S. males taller than input height. 3 Inputs threshold Height height threshold 4 Outputs male TallerHeight estimated number of U.S. males taller than threshold height male HeightMean 69. 3; (in.)Explanation / Answer
function maleTallerHeight = EstimateTallMales( thresholdHeight)
maleHeightMean = 69.3;
maleHeightStdDev = 6.01;
maleUSpopulation = 119.4;
rng ('default')
maleHeightSample = normrnd(maleHeightMean, maleHeightStdDev, [1 1000000]); %create row vector of size 1000000 containing normally distributed height data
percentageTaller = sum(maleHeightSample > thresholdHeight)*100/1000000; %calculate percentage
maleTallerHeight = sum(maleHeightSample > thresholdHeight); %calculate number of male above threshold
end
Here you go champ. The code is ready for you. For our ease i have commented parts of the code. Incase you are facing difficulty with the code please feel free to comment below. I shall be glad to help you with the code.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.