Easy probability question (brain is failing me)

  • Context: Undergrad 
  • Thread starter Thread starter filter54321
  • Start date Start date
  • Tags Tags
    Failing Probability
Click For Summary
SUMMARY

The discussion centers on calculating the sample size needed to ensure that no more than 83 out of 3,300 widgets are defective with 95% confidence. The problem is approached using statistical methods, specifically the Agresti-Coull and Clopper-Pearson intervals for binomial proportions. The user also references the central limit theorem to justify the normal approximation of the binomial distribution. The final solution involves using a Z-table to determine the necessary sample size based on the derived probability.

PREREQUISITES
  • Understanding of binomial distributions and their properties
  • Familiarity with confidence intervals, specifically Agresti-Coull and Clopper-Pearson methods
  • Knowledge of the central limit theorem and its application in statistics
  • Ability to use Z-tables for statistical calculations
NEXT STEPS
  • Study the Agresti-Coull interval for binomial proportions in detail
  • Learn about the Clopper-Pearson interval and its applications
  • Explore the central limit theorem and its implications for sample size determination
  • Practice using Z-tables for various statistical problems
USEFUL FOR

Students in statistics, quality control analysts, and professionals involved in manufacturing processes who need to understand sampling methods and defect analysis.

filter54321
Messages
36
Reaction score
0
I'm getting a masters in pure math so my family assumes I know everything there is to know about numbers. My dad asked me about something he ran into at work...something straight out of freshman stats, and I didn't have a clue - it doesn't have enough delta and epilsons.

Imagine a widget factory. Every month they produce a truckload (population) of 3,300 widgets. If defective widgets are normally distributed, how many widgets must they examine to be 95% sure that **NO MORE THAN** 83 widgets (2.5% of the population) is defective? What is the answer? How does this generalize?

From another point of view, if the quality control widget guy decided that he only wanted to inspect 100 out of 3300 widgets, it would seem that he could be 95% certain that the total number of defects was bounded in some way. How does this work? What is the answer?

This sounds like a Z-test or T-test thing but since the population isn't set, I'm incredibly rusty, and Wikipedia is failing me on this one.
 
Physics news on Phys.org
filter54321 said:
From another point of view, if the quality control widget guy decided that he only wanted to inspect 100 out of 3300 widgets, it would seem that he could be 95% certain that the total number of defects was bounded in some way. How does this work? What is the answer?

It's actually not all that easy! See Interval Estimation for a Binomial Proportion.

I use the following code (in Pari) to construct what Brown, Cai, & DasGupta call the Agresti-Coull interval:
Code:
binomialIntervalAC(n,k,conf=.05)={
  my(kappa,kest,nest,pest,radius);
  kappa=ierfc(conf/2)*sqrt(2);
  kest=k+kappa^2/2;
  nest=n+kappa^2;
  pest=kest/nest;
  radius=kappa*sqrt(pest*(1-pest)/nest);
  [max(0,pest-radius),min(1,pest+radius)]
};

I also use the Clopper-Pearson interval:
Code:
binomialIntervalCP(n:int,k:int,conf=.05)={
	my(a,v,flip,result);
	if (k==0, return([0, solve(p=0,1,(1-p)^n-conf)]));
	if (k==n, return([solve(p=0,1,p^n-conf), 1]));

	conf = conf/2;
	if (k + k > n,
		flip = 1;
		k = n - k;
	);
	a = if (k*8 < n - 10, .5, 1);
	
	v = vector(k+1,i,binomial(n,i-1));
	result = [solve(p=0,.5,1-conf-sum(i=0,k-1,v[i+1]*p^i*(1-p)^(n-i))),
	solve(p=0,a,sum(i=0,k,v[i+1]*p^i*(1-p)^(n-i))-conf)];
	
	if(flip,[1 - result[2], 1 - result[1]], result)
};
 
I'm not so sure about the program the previous guy posted, but this seems like it could be solved using a normal approximation to the binomial distribution.

So we know that if something is normally distributed, then it has a mean and variance associated with it. However, in this case, we have only binomial trials we are dealing with (whether a widget is defective or not). You stated that the desired probability of finding a defective widget is 83/3300 or about 2.5%. So, let p=83/3300.

A binomial distribution has mean= n*p, where n is the number of trials (population of widgets) and p is the probability of the trial occurring (whether you choose a defective widget) and variance n*p*(1-p). We can use the central limit theorem, which you're probably familiar with, to justify our use of a normal approximation to this distribution.

So now, instead of our defective widgets having unknown mean and variance, these parameters are now defined.

Now, if we want to choose a sample such that we are 95% sure that no more than 83 of these widgets are defective then we look at the probability: P(D<83)= .95
Since, the trials are normally distributed, we look at a Z-table and find that
P{Z<(83-np)/[(np(1-p)/sqrt(n)]}= P{Z<(83-np)sqrt(n)/[np(1-p)]}= .95

Next, (using the Z-table) let Z=1.645=sqrt(n)(83-np)/[np(1-p)]. We know the value, for p (p=83/3300). Do a little bit of algebra and you should be good.

Hope this helps! (This is my first post by the way, so sorry if anything is a bit awry)
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K