Challenge - 5 Problems
Probability Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of Normal Distribution PDF Calculation
What is the output of this MATLAB code snippet that calculates the probability density function (PDF) of a normal distribution at x = 0?
MATLAB
mu = 0; sigma = 1; x = 0; pdf_val = normpdf(x, mu, sigma); disp(pdf_val);
Attempts:
2 left
💡 Hint
Recall the formula for the normal distribution PDF at the mean.
✗ Incorrect
The normal distribution PDF at the mean (0) with standard deviation 1 is 1/sqrt(2*pi) ≈ 0.3989.
❓ Predict Output
intermediateResult of Binomial Distribution CDF Calculation
What is the output of this MATLAB code that calculates the cumulative distribution function (CDF) of a binomial distribution with n=5 trials and probability p=0.5 at x=3?
MATLAB
n = 5; p = 0.5; x = 3; cdf_val = binocdf(x, n, p); disp(cdf_val);
Attempts:
2 left
💡 Hint
Sum probabilities of 0 to 3 successes in binomial distribution.
✗ Incorrect
binocdf(3,5,0.5) sums probabilities of 0,1,2,3 successes, which equals 0.8125.
🔧 Debug
advancedIdentify the Error in Poisson PMF Calculation
What error does this MATLAB code produce when calculating the Poisson probability mass function (PMF) for k=3 with lambda=2?
MATLAB
lambda = 2; k = 3; pmf_val = poisspdf(k, lambda ); disp(pmf_val);
Attempts:
2 left
💡 Hint
Check the parentheses in the function call.
✗ Incorrect
The code is missing a closing parenthesis in the poisspdf function call, causing a syntax error.
❓ Predict Output
advancedOutput of Exponential Distribution Random Sample Mean
What is the approximate output of this MATLAB code that generates 1000 samples from an exponential distribution with mean 1 and calculates their mean?
MATLAB
lambda = 1; samples = exprnd(1/lambda, 1000, 1); mean_val = mean(samples); disp(round(mean_val,2));
Attempts:
2 left
💡 Hint
The mean of exponential distribution is 1/lambda.
✗ Incorrect
The sample mean should be close to the theoretical mean 1 because of the law of large numbers.
🧠 Conceptual
expertWhich Option Correctly Describes the Relationship Between PDF and CDF?
Which of the following statements correctly describes the relationship between the probability density function (PDF) and the cumulative distribution function (CDF) for a continuous random variable?
Attempts:
2 left
💡 Hint
Think about how area under the PDF curve relates to the CDF.
✗ Incorrect
For continuous variables, the CDF at x is the area under the PDF curve from -∞ to x, so CDF is the integral of PDF.
