Statistics help :(

tihifnis

Member
Sep 30, 2009
39
0
0
Hello again =) I have yet another question but I thought I would keep it in the same thread.

Question: A quality-control analyst wants to estimate the proportion of imperfect jeans in a large warehouse. The analyst plans to select a random sample of 500 pairs of jeans and note the proportion of imperfect pairs. If the actual proportion in the entire warehouse is 0.35, what is the probability that the sample proportion will deviate from the population proportion by more than 0.05?


Ok..I think this is a trick question somehow, and the sample size is so large (30>) that the central limit theorem applies. But other than that I'm pretty lost.
What formula do you need to use? Thank you.
 
Last edited:

dullard

Elite Member
May 21, 2001
25,126
3,514
126
Imagine that 1000 games were played (I chose that number to make the math painfully simple, but other numbers work).

Then there would be 475 wins, 263 draws, and 262 losses (total of 1000).

How many points were given? 475 * 3 + 263 * 1 + 262 * 0 = 1688.

What was the mean number of points? 1688 / 1000 = 1.688.

Do the same for variance.
 
Last edited:

us3rnotfound

Diamond Member
Jun 7, 2003
5,334
3
81
Mean = Expected = .475*3 + .263*1 + 0 = 1.68800
VAR = .475*3^2 + .263*1^2 + 0 - Expected^2 = 4.53800 - 2.849344 = 1.688656
The mean is actually the number of points expected to win from this game.

The variance is the STD^2. It is calculated most easily from E[X^2] - E[X]^2, where X is a random variable that represents the number of points won.

The probability mass function is:
fX = P(X=x) = {.475, X = 3; .263, X = 1; .262, X = 0}

It is fruitful to recapitulate:
Expected Value = E[X] = sum(x = {-inf,inf)){x*P(X=x)}.
 
Last edited:
Oct 20, 2005
10,978
44
91
Mean = Expected = .475*3 + .263*1 + 0 = 1.68800
VAR = .475*3^2 + .263*1^2 + 0 - Expected^2 = 4.344169 - 2.849344 = 1.494825

The mean is actually the number of points expected to win from this game.

The variance is the STD^2. It is calculated most easily from E[X^2] - E[X]^2, where X is a random variable that represents the number of points won.

The probability mass function is:
fX = P(X=x) = {.475, X = 3; .263, X = 1; .262, X = 0}

It is fruitful to recapitulate:
Expected Value = E[X] = sum(x = {-inf,inf)){x*P(X=x)}.

I think you have the variance wrong.

Var = [(x1 - mean)^2 + (x2 - mean)^2 + ... + (xn - mean)^2]/n

Var = [(3 - 1.688)^2 + (1 - 1.688)^2 + (0 - 1.688)^2]/3 = 1.6813

Edit: I might have used the wrong #'s above.

The 3 might need to be 1.425
The 1 might need to be .263

Substituting those #'s in, the Var then becomes 1.65
 
Last edited:

tihifnis

Member
Sep 30, 2009
39
0
0
Hm..I can you see that you say ^2 before you minus the mean, but can you mathematically do that? My statistics book says it is the other way around. I tried your example this way and it gave me a slightly different result.

.475*3 + .263*1 + 0 =
1.425 0.263 and 0.
Then I minus the mean.
-0.263 -1.425 -1.688
Then ^2
0.069169 2.030625 2.849344
The sum is 4.949138 which I take the square root of since it's in ^2.
The result is: 2.224665818

Correct?
 
Oct 20, 2005
10,978
44
91
Hm..I can you see that you say ^2 before you minus the mean, but can you mathematically do that? My statistics book says it is the other way around. I tried your example this way and it gave me a slightly different result.

.475*3 + .263*1 + 0 =
1.425 0.263 and 0.
Then I minus the mean.
-0.263 -1.425 -1.688
Then ^2
0.069169 2.030625 2.849344
The sum is 4.949138 which I take the square root of since it's in ^2.
The result is: 2.224665818

Correct?

You should take the 4.949 and divide that by 3. That will get you the variance.

Once you have the Variance, you can take the square root of it and that will be the Standard Deviation.
 

TecHNooB

Diamond Member
Sep 10, 2005
7,460
1
76
Hi, I need some help with a simple statistics question.

A football team has the following statistics.

47.5% chance of winning
26.3% chance of a draw
26.2% chance of losing

Winning gives 3 points
A draw 1 point
Losing 0 points

Question: What is the mean and variance of the number of points they'll get in a battle?

Solution: ??

For the variance I have tried this. The three possibilities times their percentage, minus mean, the result in ^2 and added up, and then I take the square root which is a variance of 114.38 points. Sooo..something is wrong :)

Hope someone can help me.

what you want to do is this:
(3 - mean)^2 * 0.475 + (1 - mean)^2 * 0.263 + (0 - mean)^2 * 0.262

this is exactly equivalent to to us3rnotfound's method, but in the form of how you intended to solve the question (i think).
 

tihifnis

Member
Sep 30, 2009
39
0
0
Hmm not sure what I did wrong.

http://en.wikipedia.org/wiki/Variance

Var[X] = E[X^2] - (E[X])^2 = .475*3^2 + .263*1^2 + 0 - 1.68800^2 = 1.688656

Hi again, I tried to help someone explaining this but instead I made an ass out of myself :(
I couldn't answer why the two parts aren't identical, and I honestly didn't spot it myself. Can someone enlighten me on this?

E[X^2] - (E[X])^2

Why is it X^2 in the first, and [X] in the second, and why does the second part have brackets? If it was just E[X]^2 it would be the same, right?
 

TecHNooB

Diamond Member
Sep 10, 2005
7,460
1
76
E(X) = sum of ( all X * probability corresponding to X )
E(X^2) = sum of ( (all X)^2 * probability corresponding to X )

Var(X) = E( ( X - E(X) )^2 ) = sum of ( (all X - E(X))^2 * probability corresponding to X )
E( X^2 - 2*X*E(X) + E(X)^2 ) Hold off on this and see below:

E( 2*X*E(X) ) = 2*E(X)*E(X) = 2*E(X)^2
For the above:
If X is a random variable with some mean value, multiplying all values of X by a constant (or 2*E(X) in this case; remember that E(X) is a mean and thus constant) will shift its mean (or E(X)) by the values of the constants you multiply it with. You can also prove it with some math and the definition of expectation.

E( X^2 - 2*X*E(X) + E(X)^2 ) = E(X^2) - 2*E(X)^2 + E(X)^2 = E(X^2) - E(X)^2
 

tihifnis

Member
Sep 30, 2009
39
0
0
Wow..thank you very much! I can't quite figure it out yet so have to go through it a couple of times, but I'm so grateful that I have an answer now :)
 

MikeMike

Lifer
Feb 6, 2000
45,885
66
91
Hello again =) I have yet another question but I thought I would keep it in the same thread.

Question: A quality-control analyst wants to estimate the proportion of imperfect jeans in a large warehouse. The analyst plans to select a random sample of 500 pairs of jeans and note the proportion of imperfect pairs. If the actual proportion in the entire warehouse is 0.35, what is the probability that the sample proportion will deviate from the population proportion by more than 0.05?

The answer is yes... yes with the photos you have posted in your bump, i bet all jeans in the sample proportion will deviate from the population proportion by more then 4"
 

Paperdoc

Platinum Member
Aug 17, 2006
2,307
279
126
For your new question, forget using any of the Mean and Standard Deviation and Confidence Interval formulas you are used to based on the "Normal Distribution". This question is done using a p-chart (based on the Binomial distribution). Look up p statistics, which are used to analyze defect levels in samples.

Before you do, you had better get straight the difference between a percent and a fraction. Probabilities often are written as a fraction, and that is the common way to write a p statistic because the letter "p" is used as the symbol for probability as a fraction. You state the problem as the "proportion of imperfect pairs of jeans in the warehouse is 0.35." That meas that over one third of the jeans are defective! I suspect the problem is supposed to have an average defect rate of 0.35%, which is 0.0035 as a fraction. Huge difference!

Now, I gotta admit that a defect rate of p=0.0035 is very low for many manufactured goods. That's 0.35 defects per 100 units, or 1.75 defects in a sample of 500 units. Tough to verify using just one 500-unit sample. On the other hand, if you are correct and the defect rate IS 0.35, those a REALLY lousy jeans and the single sample should turn up approximately 175 bad pairs. OUCH!
 

JJChicken

Diamond Member
Apr 9, 2007
6,168
16
81
OP, you better remove those pictures. They will get you banned since they show nudity (i.e. they are Not Safe for Work). Just looking out for ya :)
 

Mark R

Diamond Member
Oct 9, 1999
8,513
14
81
Whether jeans are bad or not can be modeled as a binomial distribution. Given the large size of sample, central limit theorem states that we can reasonably approximate with with a normal distribution with variance = n.p.(1-p) and mean np

So, if p = 0.35, and n = 500, the mean number of defective jeans would be 175 and the variance would be 113.75.

Our limit of tolerance is +/- 0.05 - or 25pairs of jeans in a sample. Or 2.344 [25 / sqrt(113.75)] standard deviations from the mean.

From there, you can use Z-tables to find the probability that the sample is above or below targets. This probability can also be computed exactly by the equation 1-erf(2.344/sqrt(2)).
 

tihifnis

Member
Sep 30, 2009
39
0
0
Ah ok, I well remove the pictures then :)

Mark R, according to your last equation the answer is 0.019, but when I take the 2.344 and look in my Z table, I get 2.344 = 0.4905. I then say 0,5 minus 0,4905 and I get the answer 0.0095. But since the deviation is on both sides of Z, I just multiply it with two right, and I get the answer 0.019 :) Isn't that correct? It's just that I haven't learned about erf :)