0603 Resistor Bias

-live wire-

Joined Dec 22, 2017
959
Well nothing is truly random. There is probably an unequal distribution of mass on a coin that causes one side to be more probable. Plus everyone here is ignoring the obvious 3rd option: the coin could land perfectly on it's side. Going back to the smd resistors, there is probably some propulsion due to the energy transferred to the black that makes it 49/51. Plus there is the internal mass distribution.

But assuming it's 50/50, it is just 2^n that it is all one color. The end. But this all reminds me of bit math and such.
 

WBahn

Joined Mar 31, 2012
32,878
Does anyone have another solution?
I think I can tell you how to construct the expression that has to be evaluated to find the expected value. I don't have time to explore it thought.

Let's first take the single coin case.

The probability that it will end with 1 flip is p (in this case, p = 0.5)

The probability that it will end with 2 flips is the probability that it does NOT end with 1 flip multiplied by p.

The probability that it will end with 3 flips is the probability that it does NOT end with 2 flips multiplied by p.

The probability that it will NOT end after k flips is the probability that it doesn't end on a particular flip raised to the k power.

Thus, we have the probability that it ends on the nth flip is

\(p(n) \; = \; {\(1-p\)}^{n-1}p \)

The expected number of attempts is just the weighted sum of these.

\(E \; = \; \sum_{n=1}^\infty \; n \cdot p(n) \)

For p = 0.5, this reduces to

\(p(n) \; = \; \( \frac{1}{2} \)^n \)

\(E \; = \; \sum_{n=1}^\infty \; \frac{n}{2^n} \)

This evaluates to 2 (based on a spreadsheet summation up through k=100). I don't know if this can be evaluated in closed form or not. It's been too long since I did a lot of work with series and I just don't have the time to play with it right now.

For the case of C fair coins in which they must all land heads up on the same attempt, this expected value can be expressed as

\(E \; = \; \sum_{n=1}^\infty \; \frac{\( 2^C - 1 \)^{n-1}}{2^{Cn}}n \)

For the resistor case, you have to do a double summation. Here, we have a single summation because the outcome of each trial is either all heads or not all heads. But in the resistor case, there are many results for each possible toss and so you need a double summation to cover them all. I think you actually have an infinite number of summations, but at any given point the possibilities are finite and so you just have a weighted sum on those finite number of possibilities.

I don't know how ugly it would be to get a closed form solution, but it should be fairly straightfoward to do it numerically without resorting to a Monte Carlo simulation (which could then be used to gain confidence in the result).
 

Tonyr1084

Joined Sep 24, 2015
9,744
There are three axis on the resistor that dictate its center of gravity. We naturally assume the center of gravity is also the center of its mass. But that's not likely. The reason why my toast always lands butter side down is because the butter on one side makes it the heavier side Therefore when it flips through the air (same as your resistors) the odds are in favor of landing heavy side down. Just how much in favor they are - that I can't say. But statistical analysis aside, I hate the white side of the chip.

One side of the resistor has the carbon surface which is distributed along the surface and connected to the two metalized ends. A laser cuts a channel in the carbon to fine tune the resistance. And lets not forget the marking, the paint that tells you the value of the resistor. And there may be a thin coating over that as well, making the one side much heavier than the other. So each resistor is going to have a slightly different distribution of materials on the one side. But that's all put over the top of a ceramic substrate. If you removed the carbon then I'd bet the odds of the chip landing heads up versus tails up would be 50/50. But put a little butter on one side and you're going to be picking dog or cat hair out of your toast.
 

jpanhalt

Joined Jan 18, 2008
11,087
Take n coins. Assume P(0.5) when tossed (no bias). Re-toss all heads-down (as a group) until only heads-up remain.
What is the average number of tosses required until all coins are heads up, and what does the distribution look like?
There have been 26 responses up to now, but not very many answers to that question.

As pointed out earlier, there is some ambiguity about the meaning of "average." In my mind, "most probable" is what I interpreted that to mean, To illustrate that, take two, fair coins and toss them simultaneously. The most probable result is one head and one tail. It is twice a probable as either of the other options. I also noted that Joey said "heads up," not same side up.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
6,308
I started thinking about this problem differently this morning. I think I have an answer to the probability of completing "all heads up", but not the expected number of tosses or the distribution. Maybe @WBahn can take it from here.

I was able to simplify the problem by realizing the following:

After each toss, the heads-up coins can be removed from the problem, leaving only the heads-down coins to be re-tossed. This is done until the last coin is removed from the problem at which time our task is complete.

So, therefore, the only important coin is the one that takes the most number of tosses to arrive at the heads-up position.

Now, each coin is independent, so, if we can find the probability P(t) of a single coin achieving at least one heads-up position after t throws, the probability of each of n coins achieving at least one heads-up position after t throws should be P(t)^n.

The one coin solution is easy: P(t) = (2^t -1)/2^t;

Therefore, the probability of success with n coins after t tosses should be: P(t,n) = ((2^t -1)/2^t)^n.

I ran some numbers on a spreadsheet. The 95% confidence interval for n coins and t tosses is:

n t
--------
1 5
10 8
25 9
50 10
1000 15
10000 18

Maybe @WBahn can turn the probability into an expected value and distribution? My last P&S class was a hundred years ago.

Edit: Why does the fixed width font not show up?

Edit 2: This is indeed an O(log(n)) problem. Each decade increase in the number of coins adds a bit more than 3 to the 95% number of tosses.
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
9,744
When a Baton Twirler tosses the Baton into the air the heavier end has a smaller orbital radius than the lighter end. Therefore the lighter end has greater velocity. So when it hits the ground, the higher velocity will have a greater bounce than the heavy end (assuming it doesn't land directly on one end or the other). When it bounces the heavier end stays closer to the ground. Thus, the heavier end often ends up face down when you drop a bunch of resistor chips. Like before, one side has carbon and painted numbers. Possibly a coating over the numbers to protect them from damage. The other side, the lighter side, has the greater velocity.

If you're looking for the answer to perfectly balanced chips - then that's purely statistical. And stat's are not my strongest point. By FAR, not the strongest.
 
There have been 26 responses up to now, but not very many answers to that question.

As pointed out earlier, there is some ambiguity about the meaning of "average." In my mind, "most probable" is what I interpreted that to mean, To illustrate that, take two, fair coins and toss them simultaneously. The most probable result is one head and one tail. It is twice a probable as either of the other options. I also noted that Joey said "heads up," not same side up.
I believe that I have a solution (with all due respect to all respondents, especially @WBahn) and I will humbly allow correction, but I don't think that correction is necessary in this case.

This is the OP's actual questions and setup information:

Take n coins. Assume P(0.5) when tossed (no bias). Re-toss all heads-down (as a group) until only heads-up remain.

What is the average number of tosses required until all coins are heads up, and what does the distribution look like?

First off, is the use of the word "average". To me, this can only be interpreted rationally as the expected value, given the story. Others may disagree. If you do and there is some other meaning of "average" within this context, then please disregard my post and feel free to not bother telling me why I am irrational (that line is already too long).

Because the OP has specified that all the coins are true (p=.05 for either side), we can accurately re-state the problem in terms of using a single coin or resistor. That is, how many times do you have to toss the coin or resistor to get 10 up sides vs. how many re-flips using 10 coins or resistors. It is the same, they are independent observations in both cases.

To solve this, I would use the negative binomial distribution. The expected value can be calculated by:

n/(1-p) [edited to correct typo , 1-p and not 1=p)

where p=.05 as stated, and n= the number of failures (i.e., tails up) before a success (i.e., heads up).

For a single coin toss the expected value=2.

If you use the example of 10 coins and re-tossing the ones that come up tails until you have all 10 coins heads up, the expected value is exactly
10/(1-p)=20.

For the second part of the question, "what does the distribution look like":

It is a random normal distribution and the mean and SD will depend on n.


There may be other ways to calculate this, but I recognize this from other areas and I am confident in the answer. Again, I can always stand to be corrected.
 
Last edited:

Thread Starter

joeyd999

Joined Jun 6, 2011
6,308
To solve this, I would use the negative binomial distribution. The expected value can be calculated by:

n/(1=p)
You mean n/(1-p). yes?

One (or both) of us is wrong.

Based on this, one should expect 2,000 tosses for 1,000 coins. My 95% confidence interval for 1,000 coins is only 15 flips.

I am not saying I am right. Just that our solutions seem to disagree.
 
You mean n/(1-p). yes?

One (or both) of us is wrong.

Based on this, one should expect 2,000 tosses for 1,000 coins. My 95% confidence interval for 1,000 coins is only 15 flips.

I am not saying I am right. Just that our solutions seem to disagree.
How do they disagree?

I don't know exactly what you calculated in your spreadsheet, but a 95% confidence interval is a measure of an observation ( a set of outcomes, if you will). To illustrate, if I use the observation of 2000 flips and 1000 heads (value=1) and 1000 tails (value=0). I get these values describing the distribution parameters:
mean=0.5000
sd=0.5000
CI 95%=0.0219
CI 99%=0.0288
In this example, 95% of the time you would expect the MEAN of the population to be between .5+.02=.07 and .5-.02=.03.

I think that you would want to set up a simple Monte Carlo simulation, flipping a coin until you see it 1000 heads and tracking the number of flips. That alone, should address the question in general, but to continue, do that 100 or so times and that get the mean, sd and CI95% of that set of observations (as your sample). That is, the distribution of the number of flips. Is that what you are doing in the spreadsheet?
 

Thread Starter

joeyd999

Joined Jun 6, 2011
6,308
How do they disagree?

I don't know exactly what you calculated in your spreadsheet, but a 95% confidence interval is a measure of an observation ( a set of outcomes, if you will). To illustrate, if I use the observation of 2000 flips and 1000 heads (value=1) and 1000 tails (value=0). I get these values describing the distribution parameters:
mean=0.5000
sd=0.5000
CI 95%=0.0219
CI 99%=0.0288
In this example, 95% of the time you would expect the MEAN of the population to be between .5+.02=.07 and .5-.02=.03.

I think that you would want to set up a simple Monte Carlo simulation, flipping a coin until you see it 1000 heads and tracking the number of flips. That alone, should address the question in general, but to continue, do that 100 or so times and that get the mean, sd and CI95% of that set of observations (as your sample). That is, the distribution of the number of flips. Is that what you are doing in the spreadsheet?
What I mean -- and I thought it was clear (and sorry if it wasn't) -- how many tosses are required to have at least 95% confidence that all n coins succeeded in landing in the heads up position on at least one of the tosses.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
6,308
If one assumes mean≈median≈mode, here is what I get for \(log_{2}(n) +1 \) versus joeyd's table.

View attachment 150135
Nice. But I try to avoid estimating a fitting function. I'd rather explicitly arrive at it via rigorous math -- if possible.
Silly me. It's just algebra.

The number of tosses, t, of n coins, in order to achieve a P confidence of solving the problem is (sorry, I don't know Tex):

t = -log2(1-nthroot(P))

nthroot(P) is the nth root of P.
 

WBahn

Joined Mar 31, 2012
32,878
If you use the example of 10 coins and re-tossing the ones that come up tails until you have all 10 coins heads up, the expected value is exactly
10/(1-p)=20.
This doesn't match what you would expect from a few different perspectives.

First, the odds that a given coin survives 19 tosses without coming up heads at least once is less than two in a million. But that is what is required to even need a 20th toss.

Second, if we only have ten coins but it takes twenty tosses to get them all heads up, that means that we expect to get a single coin to land heads-up every other toss. That means that we expect ALL of the remaining coins to land tails-up on half of the tosses. Does that sound reasonable?

Third, , just playing it on paper, you would expect something like this (and rounding half a tail to a full tail to make the number of tosses higher until we get to a single coin, then I'll let it land tails the first time and finally heads the second time):

Toss 1: 5 tails
Toss 2: 3 tails
Toss 3: 2 tails
Toss 4: 1 tail
Toss 5: 1 tail
Toss 6: 0 tails

So that's just 6 tosses even though things were biased in favor of a higher toss count.

As @joeyd999 correctly surmised in the original post, this process is clearly O(log(n)) where n is the number of coins/resistors.
 
Top