Untitled
unknown
plain_text
10 months ago
6.6 kB
16
Indexable
�
� Problem Set
�
� Problem 1: Plotting a Normal Distribution Curve
Data: μ = 50, σ = 10.
What to do: Plot the PDF of N(50,10²).
Expected Output: Bell-shaped curve centered at 50.
mu = 50; sigma = 10;
x = mu-4*sigma:0.1:mu+4*sigma;
y = normpdf(x,mu,sigma);
plot(x,y,'b','LineWidth',2);
title('Normal Distribution N(50,10^2)');
xlabel('x'); ylabel('Density');
�
� Problem 2: Probability Calculation from Normal Distribution
Data: Heights ~ N(170, 6²).
What to do: Find P(165 ≤ X ≤ 175).
Expected Output: Probability ≈ 0.63.
mu = 170; sigma = 6;
P = normcdf(175,mu,sigma) - normcdf(165,mu,sigma);
disp(['P(165 ≤ X ≤ 175) = ', num2str(P)]);
�
� Problem 3: Standard Normal Distribution
Data: Z ~ N(0,1).
What to do: Plot PDF and CDF.
Expected Output: Symmetric curve around 0; S-shaped CDF.
x = -4:0.1:4;
pdf = normpdf(x,0,1);
cdf = normcdf(x,0,1);
subplot(2,1,1); plot(x,pdf,'b','LineWidth',2); title('Standard Normal
PDF');
subplot(2,1,2); plot(x,cdf,'r','LineWidth',2); title('Standard Normal
CDF');
Problem 4: Z-Score Application
Data: Exam mean = 70, σ = 10. A student scored 85.
What to do: Compute Z-score and percentile.
Expected Output: Z = 1.5, Percentile ≈ 93%.
mu = 70; sigma = 10; X = 85;
Z = (X-mu)/sigma;
percentile = normcdf(Z)*100;
disp(['Z = ', num2str(Z), ', Percentile = ', num2str(percentile)]);
�
� Problem 5: Random Sampling from Normal Distribution
Data: Generate 1000 values from N(0,1).
What to do: Plot histogram with PDF overlay.
Expected Output: Histogram matches bell curve.
data = randn(1,1000);
histogram(data,30,'Normalization','pdf'); hold on;
x = -4:0.1:4; y = normpdf(x,0,1);
plot(x,y,'r','LineWidth',2);
title('Random Sampling from N(0,1)');
�
� Problem 6: Hypothesis Testing with Normal Distribution
Data: Machine filling sugar packets (μ₀ = 1 kg, σ=0.05, n=36, sample mean=0.98).
What to do: Test if underfilling at α=0.05.
Expected Output: Reject H₀, conclude underfilling.
mu0 = 1; sigma = 0.05; n = 36; xbar = 0.98;
Z = (xbar - mu0)/(sigma/sqrt(n));
p = normcdf(Z);
disp(['Z = ', num2str(Z), ', p-value = ', num2str(p)]);
�
� Problem 7: Central Limit Theorem Demonstration
Data: Uniform(0,1) samples.
What to do: Show distribution of sample means for n=30, N=10000.
Expected Output: Sample means ~ Normal.
n=30; N=10000; means=zeros(1,N);
for i=1:N
sample = rand(1,n);
means(i) = mean(sample);
end
histogram(means,'Normalization','pdf'); hold on;
mu=mean(means); sigma=std(means);
x=min(means):0.001:max(means);
plot(x,normpdf(x,mu,sigma),'r','LineWidth',2);
Problem 8: Normal Probability Plot (Q-Q Plot)
Data: 100 values from N(0,1).
What to do: Check normality.
Expected Output: Points lie close to straight line.
data = randn(1,100);
qqplot(data);
title('Normal Q-Q Plot');
Problem 9: Confidence Interval for the Mean
Data: Sample mean = 72, σ=10, n=25.
What to do: Find 95% CI.
Expected Output: Interval [68.08, 75.92].
xbar=72; sigma=10; n=25; alpha=0.05;
Z=norminv(1-alpha/2);
margin=Z*(sigma/sqrt(n));
CI=[xbar-margin, xbar+margin]
Problem 10: Quality Control Chart
Data: μ=100 mm, σ=2 mm, n=5.
What to do: Draw control chart.
Expected Output: Process mean in control unless points cross UCL/LCL.
mu=100; sigma=2; n=5;
UCL=mu+3*(sigma/sqrt(n));
LCL=mu-3*(sigma/sqrt(n));
sample_means=mu+sigma/sqrt(n)*randn(1,20);
plot(sample_means,'-o','LineWidth',2); hold on;
yline(mu,'g','LineWidth',2);
yline(UCL,'r--','LineWidth',2);
yline(LCL,'r--','LineWidth',2);
title('Quality Control Chart');
�
� Learning Outcomes
After completing this experiment, students will be able to:
✅ Understand the properties of the Normal Distribution.
✅ Compute probabilities and critical values.
✅ Apply Z-scores and percentiles.
✅ Simulate and visualize random normal data.
✅ Use CLT to explain why normal distribution is important.
✅ Apply normal distribution in hypothesis testing, CI estimation, and quality control.
✅ Use MATLAB functions (normpdf, normcdf, randn, qqplot) effectively.
Experiment 4: Normal Distribution (Extended
with Student Activities)
Aim
To study the properties and applications of the Normal Distribution, simulate data,
visualize its characteristics, and apply it to real-life problems using MATLAB.
Learning Outcomes
By the end of this experiment, students will be able to:
Understand the theoretical basis of the Normal Distribution.
Generate and visualize normally distributed data in MATLAB.
Apply the normal distribution to hypothesis testing, confidence intervals, and
CLT.
Recognize its role in quality control and statistical decision-making.
Gain hands-on experience in coding and interpreting MATLAB outputs.
Flowchart of the Experiment
Start
↓
Input data / Generate random samples
↓
Compute descriptive statistics (Mean, SD)
↓
Fit Normal Distribution & Visualize
↓
Apply concepts (Hypothesis test, CI, CLT, etc.)
↓
Interpret Results
↓
End
�
� Student Activities / Assignments
A. Short Questions (Conceptual)
1. Why is the Normal Distribution called the “bell curve”?
2. State the Empirical Rule (68–95–99.7 Rule) and explain it with an example.
3. How does the Central Limit Theorem (CLT) justify the use of normal
distribution in real-life data?
4. What is the difference between Z-scores and raw scores?
5. Give two real-world applications where normal distribution is effectively used.
B. Practice Exercises (Numerical + MATLAB)
1. Z-Scores Practice
Given exam scores: [45, 55, 65, 75, 85], mean = 65, std = 15.
o Compute the Z-scores for each value in MATLAB.
o Which students performed above average?
2. Probability Problem
In a normal distribution with μ = 100 and σ = 10,
o Find the probability that a randomly chosen value lies between 90 and
110.
o Verify using MATLAB’s normcdf.
3. CLT Demonstration
Generate 500 samples of size 30 each from a uniform(0,1) distribution.
o Plot the distribution of sample means.
o Verify whether it approximates a normal distribution.
4. Normal Probability Plot
Generate 100 random values from an exponential distribution.
o Use MATLAB’s normplot to test whether it follows a normal
distribution.
5. Quality Control Example
A factory produces rods with mean length 10 cm, std dev 0.2 cm.
o Simulate 50 rod lengths.
o Plot an X-bar control chart to check if the process is under control.
Editor is loading...
Leave a Comment