• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Stats Question For Stats People - Pill Bottle

Loss Leader

I would save the receptionist., Moderator
Joined
Jul 10, 2006
Messages
28,550
Location
Florida
I have been trying and failing to figure this out:

I have a pill bottle with 50 pills. I take half a pill a day. Each day, I shake the bottle. If I get a half-pill, I take it. If I get a whole pill, I cut it in half, take one half and put the other half back in the bottle.

Assume no physical limitations such as density or sorting or layering or whatever. As between a whole and a half, they have the same likelihood of being randomly selected.

Now, I know that on day 1, the chance that I will get half a pill is 0%. On day 100, the chance that I will get half a pill is 100%.

What I would like to know is the chance each day of getting half a pill. It seems like there should be some sort of equation that could be written and graph generated. This is well beyond my abilities.

Can you help?
 
In the real world you cannot "Assume no physical limitations such as density or sorting or layering or whatever."

If you shake the bottle, I would hazard that due to differing rates of settling of different sized "particles" in the jar (see granular convection), you are likely to be picking whole pills from the top more frequently. The odds will likely not be a linear pro(re?)gression.

If you are not shaking the bottle, then the cut pills will remain at the top and you will more frequently be picking them.

(in other words, I can't do the maths either).
 
Last edited:
I have been trying and failing to figure this out:

I have a pill bottle with 50 pills. I take half a pill a day. Each day, I shake the bottle. If I get a half-pill, I take it. If I get a whole pill, I cut it in half, take one half and put the other half back in the bottle.

Assume no physical limitations such as density or sorting or layering or whatever. As between a whole and a half, they have the same likelihood of being randomly selected.

Now, I know that on day 1, the chance that I will get half a pill is 0%. On day 100, the chance that I will get half a pill is 100%.

What I would like to know is the chance each day of getting half a pill. It seems like there should be some sort of equation that could be written and graph generated. This is well beyond my abilities.

Can you help?

For a simple closed problem like this you could just compute the answer on a spreadsheet. If the column represents the number of whole pills in the bottle, the row represents the day number and the value in the cell represents the probability of reaching that whole number of pills on that day. The formula for calculating each cell is a simple calculation involving two cells in the row above.

You should be able to take it from here.
 
Last edited:
For a simple closed problem like this you could just compute the answer on a spreadsheet. If the column represents the number of whole pills in the bottle, the row represents the day number and the value in the cell represents the probability of reaching that whole number of pills on that day. The formula for calculating each cell is a simple calculation involving two cells in the row above.

You should be able to take it from here.

I am not following your explanation.

Are you talking about calculating the probability for day 20 when one already knows what happened on the previous 19 days, or are you talking about calculating the probability for day 20 before the bottle is opened? I assumed, perhaps incorrectly, that the OPer was referring to the later. That would make the problem exceptionally difficult in that on day 20 the number of half pills could be anything between 1 and 19
 
That's interesting and I will try to steal some time from work tomorrow to think about it. Certainly seems solvable.
 
Day 1: 0
Day 2: 1/50
But then.
Day 3: (2/50+1/49)/2 ?
And then what...
Day 4: (3/50+2/49+1/48)/3 ?

I don't even know if I'm doing it right.
 
I am not following your explanation.

Are you talking about calculating the probability for day 20 when one already knows what happened on the previous 19 days, or are you talking about calculating the probability for day 20 before the bottle is opened? I assumed, perhaps incorrectly, that the OPer was referring to the later. That would make the problem exceptionally difficult in that on day 20 the number of half pills could be anything between 1 and 19


But that is not true. If you start with 50 whole pills on day 0 (before taking the first dose) then on day 20 you would have taken 20 doses as either both haves of a single pill or separate halves of two pills. On even numbered days there are always an even number of half pills left in the bottle.

The spreadsheet calculates the probability of reaching any result point P(wholes, Halves):
P(40,5) = P(40,6)*6/(40+6) + P(41,4)*41/(41+4)​

But with a simple substitution so that doses taken ( or doses remaining) is represented by the column number of the cell and the number of whole pills in the bottle is represented by the row number of the cell.
 
Indeed, it's a question of diverging conditional probabilities. By day 50 there are 50 different possible probability outcomes ranging from 0 to 1.

Each day's probability is conditional on all of the previous outcomes.

So on day 1 the probability of finding a half pill is 0.
On day 2 it's 1/50.
On day 3 it's either 0 or 2/50.
On day 4 it's 0, 1/49 or 3/50.

On day 50 you could have 50 half pills on the bottle or 25 whole pills or any combination in between, all depending on what happened on each previous day.
 
So, first day: 50 whole pills, 0 half.
Second day: 49 whole pills, 1 half
Third day: 48-49 whole pills, 0-2 half

So the odds of getting a half pill increases (by a tiny fraction) for each day, but the exact odds will be harder to calculate?
 
Last edited:
So, first day: 50 whole pills, 0 half.
Second day: 49 whole pills, 1 half
Third day: 48-49 whole pills, 0-2 half

So the odds of getting a half pill increases (by a tiny fraction) for each day, but the exact odds will be harder to calculate?
Yes, on average the probability of getting a half pill increases each day, but note that it can be 0 every other day right up to the end!
 
So when we're half way (day 50 if you'd like), we have used 50 halfs, so our total amount of pills left are 25. Those 25 can be between 50 halfs (if we've only gotten whole pills the previous days) and 25 whole (if we every other day got the reminder from the previous day).

I tried plotting it (because I like graphs), so we get 4 lines, the min and max of whole and half pills.

The WholeMax line goes down 1 every other day, while the WholeMin goes down 1 each day until reaching 0 at day 50.

While HalfMax increases each day by 1 while HalfMin is either 1 or 0.

It sounds right in my head at least.. :)
 
If I weren't so freakin' stubborn I would get out my statistics text.

Day 1, probability is 50/50 - or 1 - or 100 percent - of picking a whole pill. Leaving him with 49 wholes and 1 half. Day 2, probability is 49/50 he'll pick a whole pill and 1/50 he'll pick a half-pill. That leaves him with either 48 whole pills and 2 half pills (96 percent chance) or 49 whole pills (4 percent chance).

Day 3 dawns and he has a 96 percent chance of having 48 whole pills and 2 half pills. He has a 4 percent chance of only having whole pills. Probability is 48/50 x .04 = .9616 that he picks a whole pill and a 2/48 (.0417) that he picks a half pill.

The brute force approach starts to break down with me because I don't know if I can just combine all these probabilities (half pill vs. whole pill) as an aggregate or if I need to figure the probability of the different permutations.

Day 4: He has 47 pills and 3 halves or 48 pills and 1 half. Under the first scenario, he has a 47/50 probability of drawing a whole; under the second a 48/49 probability of drawing a whole. After "drawing" he has 46 pills plus 4 halves, or 47 plus 2 halves, or 48 wholes and no halves.

As the probability of drawing whole pills drops the probability of drawing half pills rises. I have a feeling this boils down to some blindingly obvious formula but I'm to stubborn to look it up.
 
This is just reminding me why I didn't like probability at uni.. I don't like guessing, I want facts! :)

Well then cut the ruddy things in half as soon as you get the bottle ...

I had a situation this week where a doctor had to write a prescription to last a certain amount of time, and it boiled down to taking 2/3 of a pill each day. It's a weaning thing. In real life he wrote it "Use 1/2 to 1 film daily," but he meant try to get by with half and if I get the jitters take the other half. NOT take 1/2, then cut off 1/6 from another to make it up.
 
As far as I can tell the number of whole pills decreases while the half pills increase. You hit parity at about day 44 with about 18.7 whole pills and 18.6 half pills. Then the half pills decrease.

With roughly half and half you would think they would decline at the same rate but that doesn't happen. Imagine if each stayed at exactly half. 50% of the time you would grab a half pill so this number would decrease by 1. However, the other 50% of the time you would grab a whole pill and the half count would increase by 1. So, you can see that at equal counts, the half pills tend to stay the same while the whole pills continue to drop.

It would seem to reach a more stable ratio with twice as many half pills as whole pills. For example let's say you grab 2 half pills for each whole pill. Since the whole pill adds back a half pill that would be a decrease of one each. You would get a 2:1 ratio at about day 72 with roughly 7 whole pills and 14 half pills. The decrease still won't be even though since you now have twice as many half pills to lose. Near the end you are likely to still have 4 half pills when you are down to 1 whole pill.
 
Quick and dirty:
GrLelxh.png
 
Very dirty. How can you have more than 50 half pills?
 

Back
Top Bottom