All

Groomsmen and Bridesmaids

A couple wants to invite their friends to be at their wedding party. The party will consist of five groomsmen and five bridesmaids. The groom has eight possible groomsmen, and the bride has 11 bridesmaids.

1. How many groups are possible?

The order doesn’t matter, so it’s combinations.

_nC_r = \frac{n!}{(n-r)!r!}

For the groom, it becomes,

_8C_5 = \frac{8!}{(8-5)!5!} = \frac{8*7*6*5*4*3*2*1}{(3*2*1)*(5*4*3*2*1)} = 8*7 = 56

For the bride,

_{11}C_5 = \frac{11!}{(11-5)!5!} = \frac{11*10*9*8*7*6*5*4*3*2*1}{(6*5*4*3*2*1)*(5*4*3*2*1)} = 11*3*2*7 = 462

And the overall combinations are: 56 x 462 = 25872

choose(8,5)*choose(11,5)
25872

2. Suppose one possible groomsman and one possible bridesmaid refuse to be together; how many groups are possible?

First, we leave those and make groups:

choose(7,5)*choose(10,5) 
5292

Now, add the situation where that member from one side is present, and the one from the other is moving out (there are two instances).

choose(1,1)*choose(7,4)*choose(10,5) 
choose(1,1)*choose(7,5)*choose(10,4)  
8820
4410

Sum all up:

18522

Groomsmen and Bridesmaids Read More »

Standardised Data

The total annual deaths in Florida and Alaska are 131,902 and 2,116, respectively. The total population in Florida is 12,340,000, and Alaska’s is 530,000. How are death rates compared?

Crude mortality rate

The simplest thing to do here is to calculate the crude mortality rates by dividing the deaths by the population.

FloridaAlaska
Crude mortality rate
/100,000
131,902 x 100,000/12,340,000
= 1069
2,116 x 100,000/530,000
=399

The crude mortality ratio is 1069/399 = 2.68. Does that mean that the death rate is unusually high in Alaska?

Standardisation

The problem statement is: Do Alaskans (study population) have a higher mortality rate than the Floridians (standard population)?

Step 1: Mortality rate in the standard population – stratification by age group:

AgePopulationRate
/100,000
<5850,000284
5-192,280,00057
20-444,410,000198
45-642,600,000815
>652,200,0004425
Totals12,340,000
Data from Florida

Step 2: Use study population age distribution to find the expected rate

AgeRate in FloridaPopulation
Alaska
Expected
deaths
<528460,000284×60,000/100,000
= 170.4
5-1957130,00057×130,000/100,000
= 74.1
20-44198240,000198×240,000/100,000
= 475.2
45-6481580,000815×80,000/100,000
=65.2
>65442520,0004425×20,000/100,000
= 89
Total2256.7
Data from Florida

Step 3: Compare total expected deaths to actual deaths
Standardised Mortality Rate (SMR) = 2,256.7/2,116 = 1.07

SMR is close to 1; therefore, there is nothing unusual about the death rate in Alaska compared to Florida.

References

Confounding and Effect Measure Modification: BUMC

Standardised Data Read More »

Three Cards

A bag contains three cards – one is red on both sides, the second is white on both sides, and the third is red on one side and white on the other. Amy draws a card without looking and keeps it on the table. If the card is red face up, what is the probability that it’s also red on this hidden side?

Intuition tells the probability to be 1/2. The argument goes like this: if the side up is red, there are two equal possibilities for the hidden side – red or white. Therefore, it’s 1/2. A slightly different version of the same logic estimates that once the person sees it red, it shuts the options white-white card, leaving only two red-red and red-white. The card must be one out of two.

Conditional Probability

Let’s investigate the problem using conditional probability (the Bayes’ rule).

P(RR|Ru) represents the required probability, or the card is RR given R is up.

P(RR|R_u) = \frac{P(R_u|RR)P(RR)}{P(R_u|RR)P(RR) + P(R_u|RW)P(RW)}

P(Ru|RR) = probability of red up given RR is the selected card
P(RR) = Prior probability of choosing the RR card
P(Ru|RW) = probability of red up given RW is the picked card
P(RW) = Prior probability of selecting the RW card

P(Ru|RR) must be 1 as RR will always show red up
P(RR) = 1/3, as there are three cards to choose from
P(Ru|RW) = 1/2, there is a 50:50 chance for red to show up from an RW card
P(RW) = 1/3

P(RR|R_u)= \frac{1 * 1/3}{1 * 1/3 + 1/2 * 1/3} = \frac{2}{3}

Three Cards Read More »

Three Prisoners

A, B and C are jailed for a serious crime. They are in separate cells. They came to know that one of them would be hanged the next day, and the other two would be free, based on a lottery. A learns that the lot was already drawn and asks the jailer if he is the unlucky one. The jailer won’t tell that but can give one name other than A, who will be free. Does A benefit from the information?

The sample space for release pairs is AB, AC, and BC, each carrying 1/3 probability.  The probability that A is released is 2 out of these 3 = 2/3. 

When A asks the question, the following scenarios can happen from the warden’s perspective with the respective probabilities. 

1. A and B are released, but the warden says B. The probability is 1/3 x 1. The first part is the probability of AB, and the second part is naming B, as the warden can’t say A’s name.
2. A and C are released, but the warden says C. The probability is 1/3 x 1
3. B and C are released, but the warden says B. The probability is 1/3 x 1/2
4. B and C are released, but the warden says C. The probability is 1/3 x 1/2

Here, there are two scenarios where the warden can say B (1 and 3). Only one involves A. Therefore, given the warden says B, the probability for A to be free is case 1/(case 1+ case 3) = 1/3 / (1/3 + 1/6) = 2/3. A gets no benefit from asking for the name. 

Three Prisoners Read More »

The Guessing Game

A student is attempting an exam with multiple-choice questions with four options for each question. She knows the correct answer for half of the questions and plans to guess the other half.

If a given response is correct, what is the probability that she guessed that answer?

Let P(G) be the probability for her to guess an answer, which we know is half or 1/2. P(G’), the probability she did not assume (because she knows the answer), is 1 – P(G) = 1/2. If she guesses an option, the chance that it is correct is P(C|G) = 1/4 (one in four). On the other hand, P(C|G’), where she did not guess, the probability for it to be correct is 1.

The required probability is P(G|C), or the chance that she guessed, given the correct answer.

\\ P(G|C) = \frac{P(C|G)*P(G)}{P(C|G)*P(G) + P(C|G')*P(G')} \\\\ = \frac{1/4 * 1/2}{1/4 * 1/2 + 1 * 1/2} = 1/5

20% chance.

The Guessing Game Read More »

Card Shuffle

How many cards are expected to retain the original, i.e., the place before the shuffle, position in a well-shuffled deck of cards?

Let X1 be the event where the first card retains position one after the shuffle. We give a value of 1 if it gets the right spot and 0 otherwise. A shuffled card can occupy any of the 52 positions; therefore, the probability of getting any place (including the first) is 1/52. The expected value for X1 becomes:

E(X1) = 1 x (1/52) + 0 x (51/52) = 1/52

It’s easy to notice that E(X2) also follow the same logic and becomes 1/52, etc.

The expected number for each card to stay in the same spot is:

E(X1 + X2 + X3 … X52) = E(X1) + E(X2) + E(X3) + … E(52) = 52 x (1/52) = 1

You can see that this is true for any number of cards from 1.

Card Shuffle Read More »

Average Temperature in Jakarta

The average temperature in June in Jakarta is 32 oC with a standard deviation of 5 oC. If the temperature in June follows a normal distribution:

  1. What is the probability of observing higher than 40 oC on a random June day in Jakarta?
1 - pnorm(40, mean = 32, sd = 5)
0.0548

Let’s estimate the same thing using the ‘pnormGC’ of ‘tigerstats’ package.

pnormGC(40, mean = 32, region = "above", sd= 5, graph = TRUE)

2. How cold are the coldest 10% days in June in Jakarta?

 qnorm(0.10, mean = 32, sd = 5)
25.59224
 pnormGC(25.59224, mean = 32, region = "below", sd= 5, graph = TRUE)

Average Temperature in Jakarta Read More »

The story about 2% fat milk

What is a 2% fat milk? Let’s first look at what it contains:

240 ml milk weighs around 245 g. So, the percentage weight of milk is 5 g / 245 g = 0.02 or 2%.
The milk carries a total of 130 calories, and out of these, the fat calorie is 45., which is 45/130 = 0.346 = 35%

So, this is 35% milk as well! But the producer will likely stick with the 2% narrative as it sounds healthier!

The story about 2% fat milk Read More »