Group Assignment 4 - Discrete Probability Distributions
Assignment: Probability Distribution Analysis in Semiconductor Manufacturing (Group Assignment)
Assignment 4 Groups - Use this link to join a group. You should work together on a solution and report. Groups can contain 2 or more students.
Background
You are a quality engineer at NanoChip Technologies, a semiconductor manufacturing company producing microprocessors. The company has collected data from multiple production scenarios that require statistical analysis to improve quality control and predict failure rates. Your task is to analyze these scenarios, identify the appropriate discrete probability distributions, and make data-driven recommendations.
Learning Objectives
By completing this assignment, students will be able to:
- Identify the appropriate discrete probability distribution based on problem characteristics
- Apply probability distributions to solve real-world engineering problems
- Use Python libraries (NumPy, SciPy, Matplotlib, Seaborn) for statistical analysis
- Create professional visualizations to communicate results
- Interpret results in an engineering context
Part 1: Wafer Defect Analysis (25 points)
Scenario
Your semiconductor fabrication facility produces silicon wafers in batches of 25. Historical data shows that the probability of any individual wafer having a critical defect is 0.03 (3%). The defects occur independently.
Tasks:
-
Identify the Distribution: Explain why this scenario follows a specific discrete probability distribution. List the key characteristics that led to your choice.
-
Analysis Requirements:
- Calculate the probability of finding exactly 0, 1, 2, and 3 defective wafers in a batch
- Find the probability of finding more than 2 defective wafers in a batch
- Determine the expected number of defective wafers per batch and the standard deviation
- If the company produces 100 batches per day, what is the expected total number of defective wafers?
-
Visualization (5 points): Create a bar plot showing the probability mass function (PMF) for 0 to 10 defective wafers.
Starter Code:
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats
# Set style for better-looking plots
sns.set_style("whitegrid")
plt.rcParams['figure.figsize'] = (10, 6)
# Define parameters
batch_size = 25
defect_probability = 0.03
# TODO: Identify and implement the correct distribution
# Hint: Consider what type of process this represents
# YOUR CODE HERE
Part 2: Clean Room Particle Detection (25 points)
Scenario
In your clean room facility, particle contamination events occur randomly at an average rate of 2.5 events per hour. You need to analyze the probability of contamination events during different time periods.
Tasks:
-
Identify the Distribution: Explain which discrete distribution models this scenario and why.
-
Analysis Requirements:
- Calculate the probability of exactly 0, 1, 2, 3, 4, and 5 contamination events in one hour
- Find the probability of more than 4 events occurring in one hour
- Determine the probability of no contamination events in a 30-minute period
- If contamination events require 15 minutes of cleaning, what's the probability that more than 1 hour of cleaning will be needed in a 4-hour shift?
-
Visualization:
- Create a subplot with 2 graphs:
- PMF for events in 1 hour (bar plot)
- Cumulative Distribution Function (CDF) for events in 1 hour (step plot)
Data Structure:
# Historical contamination data (events per hour for 30 days)
historical_data = [2, 3, 1, 4, 2, 3, 2, 1, 3, 2,
4, 2, 3, 1, 2, 3, 2, 5, 2, 3,
1, 2, 3, 2, 4, 2, 3, 2, 1, 3]
# Verify the average rate using this historical data
# YOUR CODE HERE
Part 3: Chip Testing Until Failure (25 points)
Scenario
You are testing a new chip design where each chip has a 0.85 probability of passing a stress test. You continue testing chips sequentially until you find the first failure.
Tasks:
-
Identify the Distribution: Identify the appropriate distribution and explain your reasoning.
-
Analysis Requirements:
- Calculate the probability that the first failure occurs on the 1st, 2nd, 3rd, 4th, and 5th test
- Find the probability that you need to test more than 10 chips before finding a failure
- Determine the expected number of tests until the first failure
- If testing costs $50 per chip, what is the expected cost to find the first failure?
-
Visualization:
- Create a line plot showing the probability of first failure for tests 1 through 20
- Add a vertical line at the expected value
- Include proper labels and legend
Part 4: Multi-Stage Production Line (25 points)
Scenario
Your production line has 5 independent inspection stations. Each station has a different probability of detecting defects:
- Station 1: 0.95 detection probability
- Station 2: 0.92 detection probability
- Station 3: 0.88 detection probability
- Station 4: 0.90 detection probability
- Station 5: 0.93 detection probability
A defective chip passes through all stations. You want to analyze how many stations will detect the defect.
Tasks:
-
Identify the Challenge: Explain why this scenario is more complex than the previous ones. Can you use a standard distribution? If not, how will you approach it?
-
Simulation Approach:
- Simulate 10,000 defective chips passing through the production line
- Calculate the empirical probability distribution for the number of stations detecting the defect
- Find the probability that at least 3 stations detect a defect
- Determine the expected number of stations that will detect a defect
-
Advanced Visualization:
- Create a figure with 3 subplots:
- Histogram of simulation results with empirical probabilities
- Box plot showing the distribution of detection counts
- Heatmap showing correlation between station detections
Simulation Framework:
def simulate_production_line(n_simulations=10000):
"""
Simulate defective chips passing through inspection stations
Returns:
- detection_counts: array of how many stations detected each chip
- station_detections: binary matrix of detection results
"""
detection_probs = [0.95, 0.92, 0.88, 0.90, 0.93]
# YOUR CODE HERE
return detection_counts, station_detections
# Run simulation and analyze
detection_counts, station_detections = simulate_production_line()
Submission Requirements - I am giving a more detailed description of the report as this is a pretty extensive assignment.
1. Written Report (PDF)
- 2-3 page report summarizing:
- Distribution identification process for each scenario
- Key findings and insights
- Engineering implications of the results
- Recommendations for quality improvement
2. Code Submission
- Submit a Colab Notebook (.ipynb) with all code, outputs, and visualizations
- Code must be well-commented
- Include markdown cells explaining your reasoning
3. Visualization Portfolio
- All plots must include:
- Clear titles and axis labels
- Legends where appropriate
- Professional formatting
- Color-blind friendly color schemes
Grading Rubric
| Component |
Points |
Criteria |
| Distribution Identification |
20 |
Correctly identifies each distribution with clear justification |
| Calculations |
30 |
Accurate probability calculations and statistical measures |
| Code Quality |
20 |
Clean, efficient, well-documented Python code |
| Visualizations |
20 |
Clear, professional, and informative plots |
| Interpretation |
10 |
Meaningful engineering insights and recommendations |
| Bonus |
+10 |
Exceptional comparative analysis and interactive features |
Resources and Hints
Python Libraries Documentation:
Distribution Quick Reference:
- Binomial: Fixed number of independent trials, constant probability
- Poisson: Events occurring at a constant average rate
- Geometric: Number of trials until first success
- Hypergeometric: Sampling without replacement
- Negative Binomial: Number of trials until r successes
Tips for Success:
- Start by clearly identifying the characteristics of each scenario
- Test your code with simple examples first
- Verify calculations using multiple approaches when possible
- Focus on clear communication of results
- Consider edge cases and limitations of your models