PDA

View Full Version : Statistics Help



TheSanityAnnex
02-16-2008, 06:16 PM
someone make an offer, I'll paypal them money, or do it for free and I'll give you a handjob/fingerbang.




500 customers of a particular hamburger chain were asked if they use mustard, ketchup, or both mustard and ketchup. It was found that 375 customers used mustard, 400 used ketchup, and 325 used both mustard and ketchup.

1. Construct a contingency table first column "eats mustard" second column "does not eat mustard" first row "eats ketchup" second row "does not eat ketchup".
2. Probability customer does not eat mustard?
3. Probability customer does not eat ketchup?
4. Probability customer does not eat mustard and does not eat ketchup?
5. Probability customer does not eat mustard or does not eat ketchup?
6. Probability customer does not ketchup, given that you already know customer does not eat mustard?
7. Are mustard and ketchup statistically independent?
8. Are mustard and ketchup mutually exclusive?


New deck of cards shuffled, given 3 cards from deck, without replacement.

1. What is the probability that the first two cards will be aces?
2. What is the probability that the first two cards will be a pair?
3. What is the probability that exactly two of the three cards will be aces?
4. What is the probability that exactly two of the three cards will be the same?

Game of blackjack.

1. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability that the first card is an ace and the second card a jack?
2. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability of getting blackjack?


The probability that a salesperson will sell a magazine subscription to someone who has been randomly selected from the telephone directory is .20. If the salesperson calls 10 individuals this evening, what is the probability that:

1. Exactly one subscription is sold?
2. At least two subscriptions are sold?


At a particular crossroads in the middle of the desert, vehicles do not drive by very often. If on average, only 36 vehicles drive by over a 24 hour period, what is the probability that exactly one vehicle will drive by in the next 10 minutes? (24 hours=144 ten minute intervals)

baseline bum
02-16-2008, 06:44 PM
someone make an offer, I'll paypal them money, or do it for free and I'll give you a handjob/fingerbang.




500 customers of a particular hamburger chain were asked if they use mustard, ketchup, or both mustard and ketchup. It was found that 375 customers used mustard, 400 used ketchup, and 325 used both mustard and ketchup.

1. Construct a contingency table first column "eats mustard" second column "does not eat mustard" first row "eats ketchup" second row "does not eat ketchup".
2. Probability customer does not eat mustard?
3. Probability customer does not eat ketchup?
4. Probability customer does not eat mustard and does not eat ketchup?
5. Probability customer does not eat mustard or does not eat ketchup?
6. Probability customer does not ketchup, given that you already know customer does not eat mustard?
7. Are mustard and ketchup statistically independent?
8. Are mustard and ketchup mutually exclusive?


M <- event customer eats mustard
K <- event customer eats ketchup
M ^ K <- event customer eats both (where ^ means intersect)

M' <- not M (ie., customer doesn't eat mustard)
K' <- not K (ie., customer doesn't eat ketchup)

1) Don't know WTF a contingency table is.

2)
Pr(M) = 375/500 = 0.75
Therefore, Pr(M') = 1-Pr(M) = 1 - 0.75 = 0.25

3)
Pr(K) = 400/500 = 0.80
Therefore, Pr(K') = 1-Pr(K) = 1-0.80 = 0.20

4) Pr(M' ^ K') = Pr (not (M U K)) = 1 - Pr(M U K) where U means union
Pr(M ^ K) = 325/500 = 0.65
Pr(M U K) = Pr(M) + Pr(K) - Pr(M ^ K) = 0.75 + 0.80 - 0.65 = 0.9
Therefore,
Pr(M' ^ K') = 1 - Pr(M U K) = 1 - 0.9 = 0.1

5) Pr(M' U K') = Pr (not(M ^ K)) = 1 - Pr(M^K) = 1 - 0.65 = 0.35

6) Pr(K' | M') = Pr (K' ^ M') / P(M') = Pr (M' ^ K') / Pr(M') = 0.1/0.25 = 0.4

7) Pr(M ^ K) = 0.65
Pr(M) * Pr(K) = 0.80 * 0.75 = 0.6
Therefore, Pr (M ^ K) is not equal to Pr(M)*Pr(K), so ketchup and mustard aren't statistically independent.

8) Pr(M^K) = 0.65 is not equal to 0, so ketchup and mustard are not mutually exclusive.

Give my handjob to midge.

atxrocker
02-16-2008, 06:55 PM
Give my handjob to midge.


:lol :lol

E20
02-16-2008, 06:57 PM
New deck of cards shuffled, given 3 cards from deck, without replacement.

1. What is the probability that the first two cards will be aces?
2. What is the probability that the first two cards will be a pair?
3. What is the probability that exactly two of the three cards will be aces?
4. What is the probability that exactly two of the three cards will be the same?
1. 1 out of 52 mutliplied by 1/51
2. 1/52 x 1/51
3. same as 1
4. sames as 2

E20
02-16-2008, 07:00 PM
1. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability that the first card is an ace and the second card a jack?
2. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability of getting blackjack?
1. 1/52 for ace, and 1/51 for jack. 1/52 * 1/51
2. 4 kings, 4 queens, 4 jacks and 4 10's so 16/52 to get a 10 card and 4 aces so 4/51 to get a black jack. 16/52 + 4/51

CubanMustGo
02-16-2008, 07:04 PM
Dude, I don't know where you learned stat but you got a lot of this wrong. Details to follow.

E20
02-16-2008, 07:05 PM
The probability that a salesperson will sell a magazine subscription to someone who has been randomly selected from the telephone directory is .20. If the salesperson calls 10 individuals this evening, what is the probability that:

1. Exactly one subscription is sold?
2. At least two subscriptions are sold?
1. 20% = .20, assuming this percentage is out of a sample of 100, then 10 is 10% of 100, so (.2 * 10)/10 = .002 or 2%
2. .0004 or .04%.

BaselineBum correct me if I am wrong.

E20
02-16-2008, 07:06 PM
Dude, I don't know where you learned stat but you got a lot of this wrong. Details to follow.
Never taken stats actually. I'm just basing this off what I learned about probability in the 10th grade. Correct me if I'm wrong.

CubanMustGo
02-16-2008, 07:10 PM
1. 1 out of 52 mutliplied by 1/51
2. 1/52 x 1/51
3. same as 1
4. sames as 2

1. Wrong. 4 aces in deck on first pull, three on second if first ace is pulled, therefore 4/52 x 3/51. Only off by a factor of 12.
2. Wrong. First card can be anything, then there will be 12 that match that card. 1 x 12/51.
3. Wrong. Exactly 2 aces means either: a) 1 & 2 are aces (but not the third), b) 1 & 3 are aces, or c) 2&3 are aces. Therefore probability is the sum of the three:
(a) 4/52 x 3/51 x 48/50 PLUS
(b) 4/52 x 48/51 x 3/50 PLUS
(c) 48/52 x 4/51 x 3/50
4. Wrong but I'm too tired to prove it. Similar to 3).

E20
02-16-2008, 07:15 PM
1. Wrong. 4 aces in deck on first pull, three on second if first ace is pulled, therefore 4/52 x 3/51. Only off by a factor of 12.
2. Wrong. First card can be anything, then there will be 12 that match that card. 1 x 12/51.
3. Wrong. Exactly 2 aces means either: a) 1 & 2 are aces (but not the third), b) 1 & 3 are aces, or c) 2&3 are aces. Therefore probability is the sum of the three:
(a) 4/52 x 3/51 x 48/50 PLUS
(b) 4/52 x 48/51 x 3/50 PLUS
(c) 48/52 x 4/51 x 3/50
4. Wrong but I'm too tired to prove it. Similar to 3).
:tu, now if that were a test I'd have gotten 0/4. Don't listen to me TSA, :lol

E20
02-16-2008, 07:16 PM
What about the other posts? For Black jack and the magazine subscription?

CubanMustGo
02-16-2008, 07:19 PM
1. 1/52 for ace, and 1/51 for jack. 1/52 * 1/51
2. 4 kings, 4 queens, 4 jacks and 4 10's so 16/52 to get a 10 card and 4 aces so 4/51 to get a black jack. 16/52 x 4/51

1. Wrong. 4/52 x 4/51.
2. Wrong. Draw a TQKJ on one card and an A on the other. Can do it in either of two ways, TJQK on first, A on second, and vice versa, so add:

(16/52 * 4/51) + (4/52 * 16/51) = 128 / (51*52)

and hell, i could be wrong too, this was like 25-30 years ago when I studied it! :dizzy

E20
02-16-2008, 07:20 PM
Yeah you are probably right, I did not take into consideration that their is more than 1 ace and 1 jack into the deck or for any problem for that matter.

baseline bum
02-16-2008, 07:20 PM
New deck of cards shuffled, given 3 cards from deck, without replacement.

1. What is the probability that the first two cards will be aces?
2. What is the probability that the first two cards will be a pair?
3. What is the probability that exactly two of the three cards will be aces?
4. What is the probability that exactly two of the three cards will be the same?



Formula
Pr (B) = Pr(A^B) + Pr(A' ^ B)
implies Pr(B) = Pr(B|A)Pr(A) + Pr(B|A')P(A')

1)
A <- event ace drawn on first card
B <- event ace drawn on first two cards

Pr(A) = 4/52
Pr(B) = Pr(B|A)Pr(A) + Pr(B|A')Pr(A')

Pr(B|A') = 0, because there's no way we can have an ace drawn for each of the first two cards if one isn't drawn on the first.

Therefore, Pr(B) = Pr(B|A) Pr(A)

There are now 3 aces left in 51 other cards, assuming A occurs (i.e., the first card is an ace)

therefore, Pr(B|A) = 3/51

therefore, Pr(B) = Pr(B|A) Pr(A) = 3/51 * 4/52 = 12/(51*52) = 0.0045 = 0.45%

2)
X <- 2nd card matches first card
Draw 1st card, so there are 51 left to choose from, exactly 3 of which match the first choice.

Therefore, Pr(X) = 3/51

3) Let Xi <- 1 if card i is an ace, and 0 if card i is not an ace for i = {1,2,3}

X <- X1 + X2 + X3

X = 2 if and only if two aces are chosen

There are 3 choose 2 = 3 ways to pick three cards, such that two are aces:
i.e,

first ace, second ace, third something else
first ace, second something else, third ace
first something else, second ace, third ace

Each is equally likely

Pr(first ace, second ace, third something else) = 4/52 * 3/51 * 48/50

(since 2 of the last 50 cards are aces)

Therefore, since each of the three cases is equally likely,
Pr(X=2) = 3*Pr(first ace, second ace, third something else)
= 3 * 4/52 * 3/51 * 48/50 = 0.13 = 1.3%

4)

Draw card 1
Yi = 1 if card i is equal to card 1, 0 o'wise for i={2,3}
Y = Y2+Y3

Exactly 2 of the three cards are the same if and only if Y = 1

Pr(Y= 1) = Pr(Y=1|Y2 = 1)P(Y2 = 1) + Pr(Y = 1 | Y2 = 0) P(Y2 = 0)

Y = 1 and Y2 = 1 if and only if Y3 = 0

Pr(Y = 1 | Y2 = 1) = 48/50 (since we have 48 cards not equal not equal to the first two, and 50 cards total left)

P(Y2 = 1) = 3/51
P(Y2 = 0) = 49/51

Y = 1 and Y2 = 0 if and only if Y3 = 1

P(Y = 1 | Y2 = 0) = 3/50 (since we have 3 cards equal to the first out of 50 left)

Therefore,
P(Y=1) = Pr(Y=1|Y2 = 1)P(Y2 = 1) + Pr(Y = 1 | Y2 = 0) P(Y2 = 0)
= 48/50 * 3/51 + 3/50*49/51 = 0.114 (11.4%)

E20
02-16-2008, 07:21 PM
Yeh so I think TSA should just listen to Baseline Bum.

baseline bum
02-16-2008, 07:24 PM
1. Wrong. 4/52 x 4/51.
2. Wrong. Draw a TQKJ on one card and an A on the other. Can do it in either of two ways, TJQK on first, A on second, and vice versa, so add:

(16/52 * 4/51) + (4/52 * 16/51) = 128 / (51*52)

and hell, i could be wrong too, this was like 25-30 years ago when I studied it! :dizzy

Drawing an ace on the second card isn't independent of drawing it on the first.

CubanMustGo
02-16-2008, 07:34 PM
Drawing an ace on the second card isn't independent of drawing it on the first.

I bow to your demonstrably superior knowledge, but the question was not talking about drawing an ace on both cards, first q was ace on first, jack on second so I believe that answer is correct.

CubanMustGo
02-16-2008, 07:36 PM
Yeh so I think TSA should just listen to Baseline Bum.\

Agreed. :toast

baseline bum
02-16-2008, 07:39 PM
Game of blackjack.

1. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability that the first card is an ace and the second card a jack?
2. If a new deck has been shuffled and you are given 2 cards from the deck without replacement, what is the probability of getting blackjack?



1)
X <- get Ace on first card
Y <- get Jack on second card

P(X ^ Y) = Pr(X|Y)Pr(Y)
= 4/51 * 4/52 = 16/(51*52) = 0.006 = 0.6%

2) B <- blackjack
X <- get ace on first card
Y <- get face or 10 (10,J,Q,K) on second card
U <- get face or 10 on first card
V <- get ace on second card
B if and only if X ^ Y or U ^ V
NOTE: X^Y and U^V are equally likely, mutually exclusive events

Pr(X^Y) = Pr(X | Y) Pr(Y)
= 4/51 * (16/52) (because there are 16 face cards)
= 64/(51*52) = 0.024 = 2.4%

Similarly,
Pr(U^V) = Pr(U|V) P(V) = 16/52 * 4/51 = 0.024

Therefore, Pr(B) = Pr(X^Y) + Pr(U^V) = 2*0.024 = 0.048 (4.8%)

baseline bum
02-16-2008, 07:40 PM
I bow to your demonstrably superior knowledge, but the question was not talking about drawing an ace on both cards, first q was ace on first, jack on second so I believe that answer is correct.

My bad, I thought you were answering the second and not the third question.

E20
02-16-2008, 07:43 PM
So baseline bum, how many years of maht have you taken and what kind of math? What is your major?

CubanMustGo
02-16-2008, 07:43 PM
My bad, I thought you were answering the second and not the third question.

No worries. I'm just glad I erased the answer I put out there for the subscription questions before you had a chance to tear it apart.
:lol

baseline bum
02-16-2008, 07:50 PM
The probability that a salesperson will sell a magazine subscription to someone who has been randomly selected from the telephone directory is .20. If the salesperson calls 10 individuals this evening, what is the probability that:

1. Exactly one subscription is sold?
2. At least two subscriptions are sold?


Think binomial random variables here:

1)
S <- number of subscriptions sold
P(S >= 1) = 1 - P(S=0)

There are 10 choose 0 = 1 ways to sell exactly zero magazines... i.e., everyone tells you to fuck off

P(S=0) = 1* 0.8^10 = 0.107374

Therefore, P(S >= 1) = 1-0.107374 = 0.892626

2) P(S>= 2) = Pr (S >= 1) - Pr(S=1)

There are 10 choose 1 = 10 ways to sell exactly one magazine
ie, either sell only to first customer, or only to second, or only to third,.., or only to tenth

Pr(S=1) = 10* 0.8^9 * 0.2 ^1 = 0.268435

Therefore, Pr(S>=2) = 0.892626 - 0.268435 = 0.624191

SpursWoman
02-16-2008, 07:51 PM
http://www.sciam.com/media/inline/000A224E-1805-11A2-97FC83414B7FFE9F_nerdy.jpg

baseline bum
02-16-2008, 08:04 PM
So baseline bum, how many years of maht have you taken and what kind of math? What is your major?

Math+CS major

Calculus (3 quarters)
Linear Algebra (2 quarters)
Abstract Algebra (2 quarters)
Real Analysis (2 quarters)
Complex Analysis
Probability (2 quarters)
Partial Differential Equations
Ordinary Differential Equations
Topology
Numerical Analysis (2 quarters)
Queuing Theory
Algorithms and Complexity
Discrete Math
Mathematical Modelling
Stochastic Processes
Computer Graphics

prob some other shit too

baseline bum
02-16-2008, 08:14 PM
At a particular crossroads in the middle of the desert, vehicles do not drive by very often. If on average, only 36 vehicles drive by over a 24 hour period, what is the probability that exactly one vehicle will drive by in the next 10 minutes? (24 hours=144 ten minute intervals)

X <- number of vehicles to come in a period

X is Poisson (just look up the prob density fcn for it, at apply it at 1 with mean 36/144)

The pdf for Poisson is EX^k * e^(-EX) / k!, where EX is the mean num of vechicles coming in a period, ie. the expected value of X for the period

EX = 36/144 = 0.25 gives the mean number of vehicles to come in a period

P(X=1) = (EX)^1 * (e^(-EX)) /1!

where exp(x) = (2.71828..)^x


Therefore,

P(X=1) = 0.25 * e^-0.25 / 1 = 0.321/1 = 0.321 = 32.1%

CubanMustGo
02-16-2008, 08:39 PM
Math+CS major

Calculus (3 quarters)
Linear Algebra (2 quarters)
Abstract Algebra (2 quarters)
Real Analysis (2 quarters)
Complex Analysis
Probability (2 quarters)
Partial Differential Equations
Ordinary Differential Equations
Topology
Numerical Analysis (2 quarters)
Queuing Theory
Algorithms and Complexity
Discrete Math
Mathematical Modelling
Stochastic Processes
Computer Graphics

prob some other shit too

Beats the hell out of 4 semesters of calculus and 1 semester each of stat and numerical methods 28 (!) years ago. Thanks, don't feel so bad now. :dizzy

1369
02-16-2008, 08:53 PM
I played lacrosse and drank beer instead of going to my stats class, but reading this thread makes me want to read this even more...

http://ecx.images-amazon.com/images/I/41TF4H15VEL._SS500_.jpg

E20
02-16-2008, 08:55 PM
Math+CS major

Calculus (3 quarters)
Linear Algebra (2 quarters)
Abstract Algebra (2 quarters)
Real Analysis (2 quarters)
Complex Analysis
Probability (2 quarters)
Partial Differential Equations
Ordinary Differential Equations
Topology
Numerical Analysis (2 quarters)
Queuing Theory
Algorithms and Complexity
Discrete Math
Mathematical Modelling
Stochastic Processes
Computer Graphics

prob some other shit too
No wonder.

spurster
02-16-2008, 10:07 PM
I disagree with BB on

4. What is the probability that exactly two of the three cards will be the same?

My answer is:

(52*51*50 - 52*48*44 - 52*3*2) / (52*51*50)

which can be simplified, but here is the story:

There are 52*51*50 ways to draw three cards.
There are 52*48*44 ways to draw three different ranks.
There are 52*3*2 ways to draw three of a kind.
Everything else left must be a pair.

CubanMustGo
02-16-2008, 10:18 PM
nevermind

mrsmaalox
02-16-2008, 11:21 PM
I took "Statistics for Healthcare Professionals" aka "Weenie Stats" and our prof made every test open book, because if we ever had to do any stats for our jobs, he figured we'd immediately find a book to work it out of! He was realistic.

baseline bum
02-16-2008, 11:46 PM
I disagree with BB on

4. What is the probability that exactly two of the three cards will be the same?

My answer is:

(52*51*50 - 52*48*44 - 52*3*2) / (52*51*50)

which can be simplified, but here is the story:

There are 52*51*50 ways to draw three cards.
There are 52*48*44 ways to draw three different ranks.
There are 52*3*2 ways to draw three of a kind.
Everything else left must be a pair.

F*ck! Probability was one of two math classes I didn't get A or better in (Got an A- in the 1st quarter of Probability and in Discrete). Not sure where I'm screwing up using the indicator R.V.s there.

baseline bum
02-16-2008, 11:48 PM
I took "Statistics for Healthcare Professionals" aka "Weenie Stats" and our prof made every test open book, because if we ever had to do any stats for our jobs, he figured we'd immediately find a book to work it out of! He was realistic.

My prof had just got out of Cambridge and killed everyone with the first exam in Probability part A. I got a 60 on it and was freaked out, until I found out the mean score was like 15.

baseline bum
02-16-2008, 11:55 PM
Eh, crap. I see where I screwed up on that problem. I made everything have to match up with the first card chosen, when another equally likely case was that the second and third card matched. That's why my answer was a factor of 3/2 off from Spurster's (correct) answer.

TheSanityAnnex
02-18-2008, 05:35 PM
thanks to all.

mrsmaalox
02-18-2008, 06:12 PM
thanks to all.

I just want to know who is getting the money/handjob/fingering!

Phenomanul
02-18-2008, 06:26 PM
X <- number of vehicles to come in a period

X is Poisson (just look up the prob density fcn for it, at apply it at 1 with mean 36/144)

The pdf for Poisson is EX^k * e^(-EX) / k!, where EX is the mean num of vechicles coming in a period, ie. the expected value of X for the period

EX = 36/144 = 0.25 gives the mean number of vehicles to come in a period

P(X=1) = (EX)^1 * (e^(-EX)) /1!

where exp(x) = (2.71828..)^x


Therefore,

P(X=1) = 0.25 * e^-0.25 / 1 = 0.321/1 = 0.321 = 32.1%

Too bad we can't ask timvp to embed mathtype fonts in the forum. :nerd :p: