# Probability with sampling question

#### hyperion111

##### New Member
i have been having problems with what should be a trivial probability problem

Suppose there are 130 patients. Each patient was administered one of 6 drugs as follows:

Drug A: 25 patients
Drug B: 31 patients
Drug C: 13 patients
Drug D: 17 patients
Drug E: 28 patients
Drug F: 16 patients

What is the probability that in a random sample of 4 patients, all 4 selected were administered drug A?

The answer in the back is 0.0823 but something tells me it is wrong.

#### derksheng

##### New Member
Doesn't (25/130)^4 assume replacement?

#### hyperion111

##### New Member
Doesn't (25/130)^4 assume replacement?
I am not sure. Suppose one case I assume replacement and another without replacement, what happens then?

#### Dason

Well think of a bag with 2 marbles where one is white and one is black. If you draw 2 marbles without replacement then with probability 1 you'll have 1 white and 1 black. If you draw with replacement then there is probability .25 of getting 2 white, probability .5 of getting 1 white and 1 black, and probability .25 of getting 2 black.

So clearly it makes a difference which one you assume is occurring. But in a random sample of patients I would assume that it is without replacement.

#### hyperion111

##### New Member
Well think of a bag with 2 marbles where one is white and one is black. If you draw 2 marbles without replacement then with probability 1 you'll have 1 white and 1 black. If you draw with replacement then there is probability .25 of getting 2 white, probability .5 of getting 1 white and 1 black, and probability .25 of getting 2 black.

So clearly it makes a difference which one you assume is occurring. But in a random sample of patients I would assume that it is without replacement.
So I should use hypergeometric distribution?

#### Dason

Well you could. But you could just use basic probability rules to figure this one out.

#### hyperion111

##### New Member
Well you could. But you could just use basic probability rules to figure this one out.
I am drawing a blank on how to use basic probability to figure this out. I would appreciate something to get me started

#### Dason

Think about sequentially sampling the patients. What is the probability that the first patient you select was administered drug A? Now - given that the first patient was given drug A what is the probability that the second patient was administered drug A? So on and so forth.

#### hyperion111

##### New Member
ok I think I may have to use a bunch of bayes forumula?
P(1st given drug A) * P(2nd given drug A | 1st given drug A) * P(3rd given drug A | (1st given drug A and 2nd given drug B))

can I assume independence?

#### Dason

You don't need Bayes formula for this and you don't need to worry about independence. What you have is definitely one way to do it though (if you continue it to the 4th person).

You should probably think about why you aren't actually using Bayes formula for this (what are you actually doing?) and why it doesn't matter if things are independent.

#### derksheng

##### New Member
The formula you gave is actually assuming dependence ($$P(B \cap A) = P(B|A)*P(A)$$).

#### Dason

The formula you gave is actually assuming dependence ($$P(B \cap A) = P(B|A)*P(A)$$).
That formula works regardless of if A and B are dependent or independent.

#### hyperion111

##### New Member
A: 1st person in sample gets drug A
B: 2nd person in sample gets drug A
and so on

P(A)P(B|A)
=P(A)P(A and B)/P(A)
=P(A and B)

???

#### hyperion111

##### New Member
ok so I am now completely lost. In my post ^ what would the next logical step be? I don't have P(A and B)

#### Dason

Well what you're actually looking for is P(Person1 had drugA AND Person2 had drugA AND Person3 had drugA AND Person4 had drugA) = P(Person1 had drugA)*P(Person2 had drugA | Person1 had drugA)*P(Person3 had .... | ...)*P(Person4 ... | ...) where you can fill in the ...s

#### hyperion111

##### New Member
I got this:
A: 1st person in sample gets drug A
B: 2nd person in sample gets drug A
C: 3rd person in sample gets drug A
D: 4th person in sample gets drug A

P(A)*P(B|A)*P(C|A and B)*P(D | A and B and C)

The problem is that I don`t have the joint probabilities A and B, A and B and C.

I am assuming sampling without replacement, so there is dependence.

#### Dason

Can you figure out P(A)?

What do you think P(B|A) is? Just think about what it means. It means that you already picked somebody that had drug A (so there are only 129 people you can choose from now and out of the original 25 patients that had drug A there are now only 24 of them that you could choose).

#### hyperion111

##### New Member
P(A)*P(B|A)*P(C|A and B)*P(D | A and B and C)
=(25/130)*(24/129)*(23/128)*(22/127)

???