Transistor biasing homework problem

Thread Starter

Vihaan@123

Joined Oct 7, 2025
220
1771386391315.png
Few assumptions i am making and attempting the problem, please correct me if i am wrong
1771386614565.png
Assuming that the transistor is in active region
\[ I_C+I_B+I_E = 0 - eq1 \\
I_C + I_B = 2mA - eq2 \\
\text {Collector and Base current relation in active region is} \\
I_C = \beta I_B \\
I_C = 49 * I_B mA - eq3 \\
\text {substitute in eq2} \\
50*I_B = 2 mA => I_B = 40\mu A => I_C = 49*40\mu A = 1.96mA \\
\text {Calculating I1} \\
I1 * 20000 Ohm - 0.7V - 2mA * 100 Ohm = 0 - eq4 \\
I1 = \frac{0.9V}{20000 Ohm} = 45\mu A \\
\text {Calculating R1} \\
\text {Current through R1} \\
I1 + I_B = 40\mu A + 45\mu A = 95 \mu A - eq5 \\
\text {Applying voltage divider rule} \\

12V - 3.3K Ohm * (I_C A+ I_B A + I_1 A) => 12 V - 3.3kOhm*(1.96mA + 95\mu A) => 6.78V \\

6.78V * \frac{R2 KOhm}{R2 KOhm + R1 KOhm} - 0.7V -0.2V = 0 - eq6 \\
6.78V * \frac{20K Ohm}{20K Ohm + R1 K Ohm} = 0.9V \\
\frac{20K Ohm}{20K Ohm + R1 K Ohm} = 0.132 \\
R1 = 131K Ohm \\

\text {To verify in active region} \\
6.78V - V_{CE} V- 0.2V = 0; - eq7 \\
V_{CE} = 6.76V \\
\text {since V_CE is above 0.2V transistor not in saturation}
\]
Request to please review if my calculations and assumptions are correct. Thank you in advance.
 

WBahn

Joined Mar 31, 2012
32,703
This is another good opportunity for you to develop your skills at checking your own work -- and, remember, that does NOT mean just walking through the math that you did the first time, but rather making sure that you are using the answer to verify that it is consistent with the problem.

First thing is to ask if there are any easy sanity checks that you can do. Better yet, before you start working the problem, are there any estimations that you can make to get a ballpark answer or at least a strict bound on what the actual answer has to be.

What if the transistor was ideal?

You would have a base voltage of 900 mV, meaning a current in R2 of 45 µA. This would also be the current in R1, since we would have no base current.

The current in the 3.3 kΩ resistor would be 2.045 mA, making the collector voltage 5.2515 V.

The R1 resistor needs to therefore drop 4.3515 V while conducting 45 Ω µA of current, which would make it 96.7 kΩ.

Now, is this an upper bound, or a lower bound?

As base current flows, the current in R1 needs to increase accordingly, but we still need about the same voltage drop across it, which means that the actual value will be lower, so it is an upper bound and if we get a larger value for our answer, we can be pretty sure that we are wrong.

Notice that we can also estimate our answer even better, since if the current in R1 doubles, meaning that the base current and the R2 current are the same, then the value of R1 will need to be very close to half this limit.

Since our base current is going to be 2% of the emitter current, that will be 40 µA, which is very close to the ideal current in R2, so we can expect our R1 to need to be close to 50 kΩ. Since the base current is less than the R2 current, we can anticipate that the needed R2 will be strictly greater than half the limit, so any value less than 48.35 kΩ is also highly suspect.

So, before we go any further, we can be pretty sure that R1 = 131 kΩ is not correct.

But, let's assume we didn't do our estimation or sanity check and want to verify the answer we got. Three obvious ways to do it for this problem come to mind:

1) Given R1 = 131 kΩ, Ie = -2 mA, and Vbe = 0.7 V, what is the α of the circuit.
2) Given R1 = 131 kΩ, Ie = -2 mA, and α = 0.98, what is the Vbe of the circuit.
3) Given R1 = 131 kΩ, Vbe = 0.7 V, and α = 0.98, what is the Ie of the circuit.

These do not necessarily involve the same degree of difficulty, but there's nothing that says that you have to stick with the one you pick first.
1771393870639.png
I just flipped a coin a few times and randomly picked the second option, so let's see where that leads.

Given the 2 mA of emitter current, the voltage at the base is 200 mV.
Given the α of the circuit, that means that the collector current is 1.96 mA and the base current is 40 µA.
The current in R2 is I2 = Vb / 20 kΩ.
The current in R1 is I1 = I2 + 40 µA
The current in the 3.3 kΩ resistor is I3 = I1 + Ic = I2 + 40 µA + 1.96 mA = I2 + 2 mA = (Vb / 20 kΩ) + 2 mA.
The collector voltage is Vc = 12 V - I3(3.3 kΩ) = 12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)
The base voltage is Vb = Vc - I1·R1 = [12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - R1(I2 + 40 µA) = [12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - R1((Vb / 20 kΩ) + 40 µA)

We now have one equation and one unknown:

Vb = [12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - R1((Vb / 20 kΩ) + 40 µA)

Vb + [(Vb / 20 kΩ)(3.3 kΩ)] + R1(Vb / 20 kΩ) = 12 V + (2 mA)(3.3 kΩ) - R1(40 µA)

Vb + [(Vb / 20 kΩ)(3.3 kΩ)] + R1(Vb / 20 kΩ) = 12 V + (2 mA)(3.3 kΩ) - R1(40 µA)
Vb·[1 + (R1 + 3.3 kΩ)/(20 kΩ)] = 12 V + (2 mA)(3.3 kΩ) - R1(40 µA)

Vb = [12 V + (2 mA)(3.3 kΩ) - R1(40 µA)] / [1 + (R1 + 3.3 kΩ)/(20 kΩ)]

Using R1 = 131 kΩ, we get

Vb = [12 V + (2 mA)(3.3 kΩ) - (131 kΩ)(40 µA)] / [1 + (131 kΩ + 3.3 kΩ)/(20 kΩ)]
Vb = [12 V + 6.6 V - 5.24 V] / [1 + (134.3/20)]
Vb = 13.36 V / 7.715 = 1.732 V

Since Ve is 200 mV, this results in a Vbe of 1.532 V, which is not even close to the 0.7 V that is stipulated.

Now, this is assuming that I didn't make a mistake. Since I'm typing this and evaluating it on the fly, this is always a possibility. At this point, you could pick on of the other two options and run it through and see if it also shows a significant discrepancy. If so, the answer is most likely wrong. If it works out, the answer is probably correct, but it would be worth the time walking back through this one to find the error.

Notice that this approach (any of the three) also offers a way to solve the problem in the first place (again, assuming I didn't futz something).

Vb = [12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - R1((Vb / 20 kΩ) + 40 µA)

Notice that this equation gives the relationship between Vb and R1. We know that Vb should be 900 mV, so we can use this equation to solve for R1 directly.

R1((Vb / 20 kΩ) + 40 µA) = [12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - Vb

R1 = {[12 V - ((Vb / 20 kΩ) + 2 mA)(3.3 kΩ)] - Vb} / {(Vb / 20 kΩ) + 40 µA}

Plugging in Vb = 0.9 V, we get

R1 = {[12 V - ((0.9 V / 20 kΩ) + 2 mA)(3.3 kΩ)] - 0.9 V} / {(0.9 V / 20 kΩ) + 40 µA}
R1 = {[12 V - ((0.9 V / 20 kΩ) + 2 mA)(3.3 kΩ)] - 0.9 V} / {(0.9 V / 20 kΩ) + 40 µA}
R1 = 4.3515 V / 85 µA = 51.19 kΩ = 51.2 kΩ (51 kΩ happens to be a standard resistor value, too)

Notice that this is very close to the quick estimate of ~50 kΩ, so there is a very good chance that it is correct.

EDIT: Fix units typo.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,703
It's also worth noting that this is an exceptionally poor way to bias a transistor, as it relies on the α of the transistor being a known and constant value. This isn't a big deal at this point in your journey, as you are just dipping your toes into the basics and will get to approaches that have a tolerance for a wide range of transistor current gain soon enough. But some students don't manage to put two-and-two together and continue to use biasing circuits like this using an assumed beta (usually of 100) with predictably disastrous results.

EDIT: Fix typos.
 
Last edited:

LvW

Joined Jun 13, 2013
1,994
It's also worth noting that this is an exceptionally poor way to bias a transistor, as it relies on the α of the transistor being a known and constant value.
Yes - I agree to the above remark.
The problem is that the current through R2 with I2=45µA has app. the same value as the base curent Ib=(1-0.98)2mA=40µA.
As a consequence, the current I1=Ib+I2 through the resistor R1 is strongly dependent on alpha which has large tolerances.

In most cases. a voltage divider connected to Vcc is used - together with sufficient negative feedback (resistor Re).
The resistor values of this divider should be as low as possible with respect to (a) power consumption and (b) minimum allowable input resistance of the stage. The current through the divider should be at least 10 times higher than the base curent Ib.
 

MrAl

Joined Jun 17, 2014
13,667
Hello,

I am getting around 51k for R1 as well, and that leads to an emitter current sensitivity percentage with Beta of around 0.2 for an increase in Beta.
For example, if we increase Beta by 50 percent (which is B0*1.5) we get an increase in emitter current by about 10 (which is 50*0.2) percent which means it goes up from 2ma to around 2.2ma. It is worse though if we see Beta fall to 1/2 of it's original value, maybe 17 percent lower, but at B0/1.5 it's about half of that.

The exact value for R1 is not 51k but it is very close to that, I won't give the exact value i calculated just yet.
 

Thread Starter

Vihaan@123

Joined Oct 7, 2025
220
\[ I_C+I_B+I_E = 0 - eq1 \\
I_C + I_B = 2mA - eq2 \\
\text {Collector and Base current relation in active region is} \\
I_C = \beta I_B \\
I_C = 49 * I_B mA - eq3 \\
\text {substitute in eq2} \\
50*I_B = 2 mA => I_B = 40\mu A => I_C = 49*40\mu A = 1.96mA \\
\text {Calculating I1} \\
I1 * 20000 Ohm - 0.7V - 2mA * 100 Ohm = 0 - eq4 \\
I1 = \frac{0.9V}{20000 Ohm} = 45\mu A \\
\text {Calculating R1} \\
\text {Current through R1} \\
I1 + I_B = 40\mu A + 45\mu A = 85 \mu A - eq5 \\
12V - 3.3K Ohm * (I_C A+ I_B A + I_1 A) => 12 V - 3.3kOhm*(1.96mA + 0.085mA) => 5.25V \\
5.25V - (0.04mA + 0.045mA)*R1 = 0.9V \\
R1*0.085mA = 4.35V => 51.17KOhm
\]
The answer is 51.17KOhm (the voltage divider rule was a problem). Yes i need to check the answer i get. Thank you for support.
 

MrAl

Joined Jun 17, 2014
13,667
\[ I_C+I_B+I_E = 0 - eq1 \\
I_C + I_B = 2mA - eq2 \\
\text {Collector and Base current relation in active region is} \\
I_C = \beta I_B \\
I_C = 49 * I_B mA - eq3 \\
\text {substitute in eq2} \\
50*I_B = 2 mA => I_B = 40\mu A => I_C = 49*40\mu A = 1.96mA \\
\text {Calculating I1} \\
I1 * 20000 Ohm - 0.7V - 2mA * 100 Ohm = 0 - eq4 \\
I1 = \frac{0.9V}{20000 Ohm} = 45\mu A \\
\text {Calculating R1} \\
\text {Current through R1} \\
I1 + I_B = 40\mu A + 45\mu A = 85 \mu A - eq5 \\
12V - 3.3K Ohm * (I_C A+ I_B A + I_1 A) => 12 V - 3.3kOhm*(1.96mA + 0.085mA) => 5.25V \\
5.25V - (0.04mA + 0.045mA)*R1 = 0.9V \\
R1*0.085mA = 4.35V => 51.17KOhm
\]
The answer is 51.17KOhm (the voltage divider rule was a problem). Yes i need to check the answer i get. Thank you for support.
Hi,

That looks good although I got something slightly different:
R1=51194.117647

So perhaps you rounded earlier than I did.

Although they did not ask for this, another interesting point is the output voltage at the collector.
With a 12v supply we would look for an output that is half that, which is 6v, but with some saturation voltage we might go slightly higher than that like up to 6.2v to maybe 6.5v, but because of the 100 Ohm emitter resistor which presumable has a 2ma current, we might add another 0.2v so that takes us up to 6.4v to maybe 6.7v as a target collector voltage. This is to get the maximum symmetric dynamic output range.
They do not mention this so it's not a problem really, I just thought I would mention it. It would also mean checking the possible range of Beta to see the quiescent output voltage spread also.
 

LvW

Joined Jun 13, 2013
1,994
Hi,

That looks good although I got something slightly different:
R1=51194.117647

So perhaps you rounded earlier than I did.
May I give a comment to this calculation?
I am not sure if such a value makes much sense - knowing that the values for (a) alpha (in real practice) and (b) the assumed voltage of Vbe=0.7V are connected with a lot of uncertainty.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,703
May I give a comment to this calculation?
I am not sure if such a value makes much sense - knowing that the values for (a) alpha (in real practice) and (b) the assumed voltage of Vbe=0.7V are connected with a lot of uncertainty.
Agreed -- it makes absolutely zero sense. The alpha was given with two sig figs and the Vbe was only given with one! Arguably, an answer of 50 kΩ is all that is justified, though two sig figs at 51 kΩ is completely reasonable.

The general rule in most engineering contexts to report final results to three sig figs and perform calculations so that arithmetic roundoff results in, at most, a change of one digit value in the third sig fig. This is almost always accomplished by keeping two additional sig figs (though one is usually sufficient) in any intermediate values that are then used later (though it is best to let the calculator/spreadsheet/program keep intermediate results to the full internal resolution as much as possible). Keeping more sig figs on intermediate results actually increases the likelihood of making a mistake as humans are not good at working with long strings of effectively random digits, even if it's just writing them down and then entering them later into a calculator. We skip digits, transpose digits, or duplicate digits. Best practices should always take human factors into account.
 

MrAl

Joined Jun 17, 2014
13,667
May I give a comment to this calculation?
I am not sure if such a value makes much sense - knowing that the values for (a) alpha (in real practice) and (b) the assumed voltage of Vbe=0.7V are connected with a lot of uncertainty.
Hello there nice to see you posting again.

I understand the reason for your concern but I can assure you the uncertainty has very little to do with that calculation. The reason I posted:
R1=51194.117647

with such precision is not because the Beta can change or the Vbe can change, and change significantly as you know, but so that anyone that duplicates the precision calculation could match up the results to be at least nearly exact to that very number. For example, I should not really post:
R1=51194.117648

because that is 1 microunit off. It's probably ok though anyway.

I can probably get away with this too:
R1=51194.118

because that is probably accurate enough for a good comparison, so let's look at the value I posted and this value too.

R1=51194.117647
now technically if they post R1=51194.117650 that could indicate a problem in either mine or their calculation. This may seem a little extreme though, so now the second value:
R1=51194.118

Now if they post R1=51194.117 that means one calculation may be wrong, or they just don't know how to round properly.

We might get away with R1=51194 even, because that's already 5 digits, but the more precise the number is the better it is at catching a wrong calculation or rounding error. By contrast the number value:
R1=50k

is very bad at catching an error, and catching an error is an important feature in helping a person who is asking for a check of their work.

Now as to the value I might recommend, I would probably recommend 51k even though I posted such a precise number. The precise number is for error checking, the recommendation is for the actual circuit in real life. Two different numbers, two different purposes.

You are certainly right to question this number though because we could never get that exact value in real life (ha ha). However, if you can get that value in real life please let me know how you did it :)
 

MrAl

Joined Jun 17, 2014
13,667
Agreed -- it makes absolutely zero sense. The alpha was given with two sig figs and the Vbe was only given with one! Arguably, an answer of 50 kΩ is all that is justified, though two sig figs at 51 kΩ is completely reasonable.

The general rule in most engineering contexts to report final results to three sig figs and perform calculations so that arithmetic roundoff results in, at most, a change of one digit value in the third sig fig. This is almost always accomplished by keeping two additional sig figs (though one is usually sufficient) in any intermediate values that are then used later (though it is best to let the calculator/spreadsheet/program keep intermediate results to the full internal resolution as much as possible). Keeping more sig figs on intermediate results actually increases the likelihood of making a mistake as humans are not good at working with long strings of effectively random digits, even if it's just writing them down and then entering them later into a calculator. We skip digits, transpose digits, or duplicate digits. Best practices should always take human factors into account.
Hi,

It makes sense to question that incredibly precise number, but there is a very good reason for it. It helps to catch errors in calculations.
We might get away with R1=51194 or even 51k, but the more precise the number is the more likely it is to catch an error. It could be just a rounding error. It could also be because of rounding intermediate results, which sometimes can really wreck the whole calculation. I think I would recommend 51k for use in real life.

So the two numbers:
R1=51194.117647 and R1=51000

are certainly useful but one is for error catching and the other is for a real life recommendation.
 

panic mode

Joined Oct 10, 2011
4,864
this is just an exercise to test understanding of basic electronic and applying what was presented in lectures. the problem i see is that most students will never play with and try to draw own conclusions, such as how values affect the circuit, what is the current circuit similar to, what can be better etc. anyone studying this should have basic home lab and push things to their limits (and beyond). seeing failure modes is also a valuable lesson.

back to this circuit: for amplifier, bias is not good, signal would be distorted - in steady state (no signal) output should be closer to 1/2 of supply. in present form this works more like a soft 3V Zener. reducing or removing emitter resistor would make it a stiffer but still not quite match the actual Zener.
 

MrAl

Joined Jun 17, 2014
13,667
this is just an exercise to test understanding of basic electronic and applying what was presented in lectures. the problem i see is that most students will never play with and try to draw own conclusions, such as how values affect the circuit, what is the current circuit similar to, what can be better etc. anyone studying this should have basic home lab and push things to their limits (and beyond). seeing failure modes is also a valuable lesson.

back to this circuit: for amplifier, bias is not good, signal would be distorted - in steady state (no signal) output should be closer to 1/2 of supply. in present form this works more like a soft 3V Zener. reducing or removing emitter resistor would make it a stiffer but still not quite match the actual Zener.
Hi there,

I am not sure if you recognize that structure, but it is an amplifier with an implied input.
When they show it like that we usually assume there will be a capacitive coupling that comes later for coupling the input signal to the base most likely.
It is true however that it may not be biased correctly with 2ma in that 100 Ohm resistor, but it's not extremely bad I don't think.
 

WBahn

Joined Mar 31, 2012
32,703
I understand the reason for your concern but I can assure you the uncertainty has very little to do with that calculation. The reason I posted:
R1=51194.117647

with such precision is not because the Beta can change or the Vbe can change, and change significantly as you know, but so that anyone that duplicates the precision calculation could match up the results to be at least nearly exact to that very number. For example, I should not really post:
R1=51194.117648
Well, your answers are fundamentally wrong because you are claiming that a resistance is equal to pure number. But I'll overlook that because you've consistently made it clear that you don't care about treating units properly.

Claiming that someone has made a mistake unless they agree with your result to 11 sig figs is pretty ludicrous. Why not the full fifteen sig figs that a double represents and insist that unless they post

R1 = 51.1941176470588 kΩ

and unless you agree to it out to that point, that someone has made a mistake.

Since your answer doesn't agree with that, does that mean that you've made a mistake or that you don't know how to round properly?

Of course not!

Just as someone that gives an answer of

R1 = 51.2 kΩ

has almost certainly done it correctly.

Furthermore, if the answers agree to the justified number of sig figs, then no matter how much they disagree after that in no way indicates that someone has done something incorrectly or that they don't know how to round. It indicates, at most, that they simply chose to round intermediate results at different places, with neither being more correct or incorrect than the other. Since any equation other than very simple ones can be written in numerous forms, the roundoff behavior will depend on the exact form used and the order in which operations are carried out, even if the results are carried internally throughout the evaluation. Even something as simple as evaluating (1-α)R2 as written versus evaluating it as R2-αR2 is going to have an impact. Usually, the impact will be near the resolution of the representation, but that is not guaranteed.

I did a little experiment in Excel and had it round to a set number of sig figs (as opposed to the number of digits after the decimal point, which is a very different critter) and here are the results. The result on the first row, with sig figs equal to zero, is the calculation without any intermediate rounding carried out in a single equation. The rest of the results had each intermediate result rounded to the specified number of sig figs after each operation (of which there were a total of thirteen).

The results were all then displayed with 16 digits after the decimal point.

Code:
S.F.  Result
 0    51.1941176470588000
 1    40.0000000000000000
 2    49.0000000000000000
 3    51.3000000000000000
 4    51.1900000000000000
 5    51.1940000000000000
 6    51.1941000000000000
 7    51.1941200000000000
 8    51.1941180000000000
 9    51.1941176000000000
10    51.1941176500000000
11    51.1941176470000000
12    51.1941176471000000
13    51.1941176470600000
14    51.1941176470590000
15    51.1941176470588000
16    51.1941176470588000
As can be seen, there are a few places where the value that would be reported at the corresponding number of sig figs would vary from the next one to a degree that you would declare that an error had occurred.

A more useful, albeit anecdotal, observation is that even rounding to three sig figs yielded an answer that is within the span of uncertainty for three sig figs, despite the accumulated roundoff error from thirteen steps.

Also, even with rounding all intermediate results to a single sig fig actually produced a final result that was surprisingly close. This is likely a case where the exact order in which operations were carried out would make quite a difference, as rounding (1-α)R2 would lose the α not being 1, while distributing R2 first would preserve it. Worse, since α appears twice in the equation that was evaluated, in the numerator it had an effect, but in the denominator it was lost.
 

LvW

Joined Jun 13, 2013
1,994
----back to this circuit: for amplifier, bias is not good, signal would be distorted - in steady state (no signal) output should be closer to 1/2 of supply. in present form this works more like a soft 3V Zener. reducing or removing emitter resistor would make it a stiffer but still not quite match the actual Zener.
".....bias is not good"...
Yes, the shown bias circuitry needs improvement - however, not because of "distortions".
The main problem is that the resistor values of the voltage divider are too large - resulting in current through the resistors which is in the same order as the base current.
As a consequence, the DC operating point strongly depends on the ratio Ic/Ib which in reality has very large tolerances.
(By the way: This has nothing to do with distortions).

More than that, for Rc=3.3k and Re=0.1k the DC operating point is at Vce=12-(3.4k*2mA)=5.2 volts.
I think that - for small signal operation - this value is close enough to Vcc/2=6v
It is realy not necessary to have Vce exactly at Vcc/2.
However, for a good stabilization I would recommend to increase the emitter resistor to (for example) 0.5k.
Remember, without a capacitor Ce in parallel to Re, we have signal feedback which reduces non-linear effects (distortions).
(Of course, a recalculation of the biasing scheme would be necessary if the current must be still 2mA).
 

MrAl

Joined Jun 17, 2014
13,667
Well, your answers are fundamentally wrong because you are claiming that a resistance is equal to pure number. But I'll overlook that because you've consistently made it clear that you don't care about treating units properly.

Claiming that someone has made a mistake unless they agree with your result to 11 sig figs is pretty ludicrous. Why not the full fifteen sig figs that a double represents and insist that unless they post

R1 = 51.1941176470588 kΩ

and unless you agree to it out to that point, that someone has made a mistake.

Since your answer doesn't agree with that, does that mean that you've made a mistake or that you don't know how to round properly?

Of course not!

Just as someone that gives an answer of

R1 = 51.2 kΩ

has almost certainly done it correctly.

Furthermore, if the answers agree to the justified number of sig figs, then no matter how much they disagree after that in no way indicates that someone has done something incorrectly or that they don't know how to round. It indicates, at most, that they simply chose to round intermediate results at different places, with neither being more correct or incorrect than the other. Since any equation other than very simple ones can be written in numerous forms, the roundoff behavior will depend on the exact form used and the order in which operations are carried out, even if the results are carried internally throughout the evaluation. Even something as simple as evaluating (1-α)R2 as written versus evaluating it as R2-αR2 is going to have an impact. Usually, the impact will be near the resolution of the representation, but that is not guaranteed.

I did a little experiment in Excel and had it round to a set number of sig figs (as opposed to the number of digits after the decimal point, which is a very different critter) and here are the results. The result on the first row, with sig figs equal to zero, is the calculation without any intermediate rounding carried out in a single equation. The rest of the results had each intermediate result rounded to the specified number of sig figs after each operation (of which there were a total of thirteen).

The results were all then displayed with 16 digits after the decimal point.

Code:
S.F.  Result
0    51.1941176470588000
1    40.0000000000000000
2    49.0000000000000000
3    51.3000000000000000
4    51.1900000000000000
5    51.1940000000000000
6    51.1941000000000000
7    51.1941200000000000
8    51.1941180000000000
9    51.1941176000000000
10    51.1941176500000000
11    51.1941176470000000
12    51.1941176471000000
13    51.1941176470600000
14    51.1941176470590000
15    51.1941176470588000
16    51.1941176470588000
As can be seen, there are a few places where the value that would be reported at the corresponding number of sig figs would vary from the next one to a degree that you would declare that an error had occurred.

A more useful, albeit anecdotal, observation is that even rounding to three sig figs yielded an answer that is within the span of uncertainty for three sig figs, despite the accumulated roundoff error from thirteen steps.

Also, even with rounding all intermediate results to a single sig fig actually produced a final result that was surprisingly close. This is likely a case where the exact order in which operations were carried out would make quite a difference, as rounding (1-α)R2 would lose the α not being 1, while distributing R2 first would preserve it. Worse, since α appears twice in the equation that was evaluated, in the numerator it had an effect, but in the denominator it was lost.
Hello,

Well saying this is wrong is in itself wrong. I've been doing this for years and it's been working just as I explained.
All I can say is that you still may not understand the reason for this or the underlying concept.
Also, you are criticizing something I already explained, and that was about intermediate rounding.

If I come up with a result that is:
24

and they come up with a result that is:
25

There COULD be a mistake in either what I posted or what they posted. There's no way around it. That's because it a conditional not an absolute.
Take this to the next level, I post 24.5 and they post 24.6, then we move to explore why there is a difference. The difference MAY point to a mistake either I made or they made. We may sometimes just write it off as a rounding error or just difference.

The key foundational point here is this:
When two results are the same, they are probably the right results.
When two results are different, they may invoke an exploration into why they are different.

Here's another point:
The more complicated the calculation is, the more likely there is to be a smaller difference in the error, if there is really an error. That means even a difference of 1e-6 can mean there has been a mistake somewhere.

Still don't believe it? Then try to fit circles of sizes 1, 2, 3, 4, 5, ..., N into the smallest circle they can all fit into. Your result must match previous calculations out to an error of 1e-100.
N=1 is easy because that means the outer circle is the same as the single inner circle.
N=2 is also easy because two circles fit across the center so they only meet with the outer circle at two points.
N=3 gets a tiny bit more difficult because we have to start to use equations of the intersection of circles.
N=4 is basically the same, but with more equations.
N=5 and above start to get more complex.

There are various theories on how to handle large N, but if your calculation does not match the previous calculations out to 1e-100 then you end up with a reduction in points. You get 1 point for each correct matching result. That means if you get up to N=2 and you have gained 2 points, then you got both of them to match. If you have 3 points, you got N=3 correct. If you got 10 points then you got up to N=10 correct. However, if you get 9.999999 then you were off a little on one of the calculations, it could have been either of them and you don't know what one was wrong unless you submit them one at a time, and get results back immediately after each submission.

I am quoting 1e-100 as the max error, but it could be even 1e-50 for example.

As I said above, I had been using this idea for years now, even before simulators came into popular use. I've detected errors with even small differences like 1e-4, and in the above exercise, 1e-100 (or 1e-50 if you feel more comfortable with that limit).
The 1e-4 comes from electrical circuit calculations, the 1e-100 comes from pure numerical number problems.

I don't see how this can be misunderstood though. If someone loses a red ball and someone comes to them and says, "I found your ball" and the ball is blue, it's probably not the same one that was lost :)
If it really was the same ball, there could indeed be reasons why the ball turned blue, but then an investigation would be warranted. Since we may not know that at first though, we might want to investigate just to see if it was the same ball that turned blue, then try to find out why it turned blue.
 

WBahn

Joined Mar 31, 2012
32,703
If I come up with a result that is:
24

and they come up with a result that is:
25

There COULD be a mistake in either what I posted or what they posted. There's no way around it. That's because it a conditional not an absolute.
Take this to the next level, I post 24.5 and they post 24.6, then we move to explore why there is a difference. The difference MAY point to a mistake either I made or they made. We may sometimes just write it off as a rounding error or just difference.
So, if they report 24 and you report 25, you don't explore why there is a difference, but if they report 24.5 and you report 24.6, now you DO????

The more complicated the calculation is, the more likely there is to be a smaller difference in the error, if there is really an error. That means even a difference of 1e-6 can mean there has been a mistake somewhere.
Huh?

So if we both do a simple problem like calculating the voltage across a 2.3 Ω resistor that has 1.7 A of current flowing in it, then we would expect the difference in our results to be MORE than if we were both tasked with calculating the voltage across that same resistor when it is the emitter resistor on an NPN transistor that used a resistive voltage divider to establish the base bias voltage and we must use the full Ebers-Moll transistor model, including the Early effect and the temperature dependencies of every component?????

Still don't believe it? Then try to fit circles of sizes 1, 2, 3, 4, 5, ..., N into the smallest circle they can all fit into. Your result must match previous calculations out to an error of 1e-100.
N=1 is easy because that means the outer circle is the same as the single inner circle.
N=2 is also easy because two circles fit across the center so they only meet with the outer circle at two points.
N=3 gets a tiny bit more difficult because we have to start to use equations of the intersection of circles.
N=4 is basically the same, but with more equations.
N=5 and above start to get more complex.
Perhaps it's just they way you are phrasing this, but I can't tell what this "previous calculation" is that we are having to be in agreement with at a level that requires 145 bits.

There are various theories on how to handle large N, but if your calculation does not match the previous calculations out to 1e-100 then you end up with a reduction in points. You get 1 point for each correct matching result. That means if you get up to N=2 and you have gained 2 points, then you got both of them to match. If you have 3 points, you got N=3 correct. If you got 10 points then you got up to N=10 correct. However, if you get 9.999999 then you were off a little on one of the calculations, it could have been either of them and you don't know what one was wrong unless you submit them one at a time, and get results back immediately after each submission.
If you get 1 point for each matching result, how can you get 9.999999 points?

I am quoting 1e-100 as the max error, but it could be even 1e-50 for example.
Quoting from where???
 

MrAl

Joined Jun 17, 2014
13,667
So, if they report 24 and you report 25, you don't explore why there is a difference, but if they report 24.5 and you report 24.6, now you DO????



Huh?

So if we both do a simple problem like calculating the voltage across a 2.3 Ω resistor that has 1.7 A of current flowing in it, then we would expect the difference in our results to be MORE than if we were both tasked with calculating the voltage across that same resistor when it is the emitter resistor on an NPN transistor that used a resistive voltage divider to establish the base bias voltage and we must use the full Ebers-Moll transistor model, including the Early effect and the temperature dependencies of every component?????



Perhaps it's just they way you are phrasing this, but I can't tell what this "previous calculation" is that we are having to be in agreement with at a level that requires 145 bits.



If you get 1 point for each matching result, how can you get 9.999999 points?



Quoting from where???
Hello again,

I see you still don't understand this point, but I guess you understood the red ball and blue ball problem because you did not respond to that?

It's as simple as that. If you have a difference, you MAY explore it. You are not forced to, unless you want to see if there was an error made somewhere.

You get 1 point for each matching result, but that's for each MATCHING result.
If you can get 9.999999 then that means for a result that does not match you must get a different result that reflects the precision of your calculation. The score you get will be less than 1 for an entry that was not exactly correct. If you are way off you many only get a score of 0.5 for that entry bringing the total to 9.5 for example. That would mean you got 9 precise and 1 much less accurate. If you got 9.9 then you got 9 right and 1 close but not matching.

You can imagine this as a mathematical homework problem, or just a math challenge. You don't seem to like the error of 1e-100 probably because that is less common than say 1e-2 let's say. So let's relax it to 1e-10 which is less precise.
You start with a circle of diameter 1, and of course that fits into a circle of diameter 1, so that means you'll get a score of 1 for that N.
With the next N you fit two circles into 1, and that means the diameter of the enclosing circle is 2, so you get a score of 1+1=2.
The next N is 3 so you have to fit 3 into 1 larger circle, let's say you are off by 2e-10 and since the threshold is less being 1e-10, you may only get a score of 0.9 so your total would not be 1+1+1=3 it would be 1+1+0.9 which is only 2.9 and that indicates something was not right with one of the calculations. If you submit them all at once, you won't know which one you got wrong, so you can submit them one at a time. After the third submission, you will see your score change to 2.9 up from 2.0, which tells you the last entry was not exact.

This is a practical example for numerical analysis and geometric techniques, but to frame this as an electronic problem we only have to imagine a circuit with say 10 resistors and calculate the total resistance. If the 'book' result is 5 Ohms and I get 6 Ohms, I can assume I made a mistake, or that the book was wrong to begin with. It could be less of an error though, I may get 5.1 Ohms. Sometimes we write that off as rounding, but other times we look into it to see if we made a mistake. The better idea is to look into it because for example the book may have used 9.9k and I used 10k so the result was off a little. This kind of difference is fairly common really.

The red ball and blue ball was a sort of binary difference, but it could be MUCH more subtle. That subtlety is what I am talking about with the extreme precision of the results. It does not matter if it is binary or very subtle (off by 1e-10) it can still be viewed as DIFFERENT, and that can trigger an analysis of why that difference came about. In the circles example, it had to be very accurate because that was the name of the game. It does not matter where the 1e-100 or 1e-50 or 1e-10 came from, the fact is it was given to you to match. If you match it for every N from say 1 to 20 you would end up with a perfect score of 20, but if one or more did not get as close as the error limit then your score would be less than 20.
Now just to throw in a kicker, if you get a perfect score of 20 you get $100 USD, but if you get less than 20 you get nothing, but you do get a chance to recalculate any of your results for a second chance at winning the hundred dollars. In this case the results have a profound effect on the result, you either get some money or you don't. That 1e-10 suddenly becomes very important. The dollar amount could be even higher.

Again, the whole idea of a DIFFERENCE is what this is all about. The difference depends on the nature of the problem.
Another example is the problem of using units in a calculation. If the correct result is "Ohms" and you come up with "Volts" then you know something is wrong. This is less subtle than other differences, but the less subtle ones are still important. They can be viewed as a heuristic for deciding if there was an error somewhere or not.

So do you have any comment for the red ball and blue ball example?
 

WBahn

Joined Mar 31, 2012
32,703
Hello again,

I see you still don't understand this point, but I guess you understood the red ball and blue ball problem because you did not respond to that?

It's as simple as that. If you have a difference, you MAY explore it. You are not forced to, unless you want to see if there was an error made somewhere.

You get 1 point for each matching result, but that's for each MATCHING result.
If you can get 9.999999 then that means for a result that does not match you must get a different result that reflects the precision of your calculation. The score you get will be less than 1 for an entry that was not exactly correct. If you are way off you many only get a score of 0.5 for that entry bringing the total to 9.5 for example. That would mean you got 9 precise and 1 much less accurate. If you got 9.9 then you got 9 right and 1 close but not matching.
Now you are changing the problem. Before, it was that you got one point for each match. Period. Now you get some smaller, but unspecified, amount if there is a mismatch. That makes the feedback value of the score almost meaningless, even to the point of quickly not being able to determine how many scores weren't a perfect match to 100 sig figs.

You can imagine this as a mathematical homework problem, or just a math challenge. You don't seem to like the error of 1e-100 probably because that is less common than say 1e-2 let's say. So let's relax it to 1e-10 which is less precise.
I don't like your error criterion of 1e-100 because I think it is absurd. Since you claim that you've been doing comparisons to this level for decades, I'm more than willing to change my mind if you can show me a REAL problem in which this was required, and in which a disagreement in two calculations above that threshold actually meant anything. I certainly don't see this very contrived problem as one, though. To describe the diameter of the observable universe (~4.4e+26 m) to the resolution of the diameter of a single proton (~8.4e-16 m) would require only 42 sig figs. Even using the quantum of length, the Planck constant (~1.6e-35 m) would only require 62 sig figs.

Since you stated, "As I said above, I had been using this idea for years now, even before simulators came into popular use. I've detected errors with even small differences like 1e-4, and in the above exercise, 1e-100 (or 1e-50 if you feel more comfortable with that limit). The 1e-4 comes from electrical circuit calculations, the 1e-100 comes from pure numerical number problems." I'd be interested just to see what the size of the smallest circle, to 100 sig figs, that can contain the first 10 circles.

[/QUOTE]
This is a practical example for numerical analysis and geometric techniques, but to frame this as an electronic problem we only have to imagine a circuit with say 10 resistors and calculate the total resistance. If the 'book' result is 5 Ohms and I get 6 Ohms, I can assume I made a mistake, or that the book was wrong to begin with. It could be less of an error though, I may get 5.1 Ohms. Sometimes we write that off as rounding, but other times we look into it to see if we made a mistake. The better idea is to look into it because for example the book may have used 9.9k and I used 10k so the result was off a little. This kind of difference is fairly common really.
[/QUOTE]

Let's use this simple example. What is the effective resistance of a R1=6.8 kΩ resistor in parallel with a R2=2.7 Ω resistor.

I used the Windows calculator and got:

R = 2.6989283666779367016037749717024 Ω

You are saying that if someone else gets a result that differs in that last digit that that is somehow useful in detecting that one of use made an error or doesn't know how to round.

The red ball and blue ball was a sort of binary difference, but it could be MUCH more subtle. That subtlety is what I am talking about with the extreme precision of the results. It does not matter if it is binary or very subtle (off by 1e-10) it can still be viewed as DIFFERENT, and that can trigger an analysis of why that difference came about. In the circles example, it had to be very accurate because that was the name of the game. It does not matter where the 1e-100 or 1e-50 or 1e-10 came from, the fact is it was given to you to match. If you match it for every N from say 1 to 20 you would end up with a perfect score of 20, but if one or more did not get as close as the error limit then your score would be less than 20.
Now just to throw in a kicker, if you get a perfect score of 20 you get $100 USD, but if you get less than 20 you get nothing, but you do get a chance to recalculate any of your results for a second chance at winning the hundred dollars. In this case the results have a profound effect on the result, you either get some money or you don't. That 1e-10 suddenly becomes very important. The dollar amount could be even higher.

Again, the whole idea of a DIFFERENCE is what this is all about. The difference depends on the nature of the problem.
Another example is the problem of using units in a calculation. If the correct result is "Ohms" and you come up with "Volts" then you know something is wrong. This is less subtle than other differences, but the less subtle ones are still important. They can be viewed as a heuristic for deciding if there was an error somewhere or not.

So do you have any comment for the red ball and blue ball example?
In your red/blue ball example, you are changing things entirely. Here, you are saying that if there is a difference in the most significant bit, we have a discrepancy. But your prior claims are that we don't know if we have a discrepancy if we agree to N bits but that, somehow, it is useful in detecting errors if we disagree to M bits with M >> N. I'm saying that there is a maximum value of M for which this is the case in any useful sense (with M being problem/domain specific).

Here's a more accurate analogy. I lose a red ball, someone comes up and gives me a red ball. But there is a microscopic spec of blue on it, so we need to launch an investigation to determine if it is the same ball or if something happened to put that spec on it. It would be like if I go to pick up my wife at the airport and then questioning if it is really her because she has one more gray hair than when I last saw her (probably more, if she visited her mother). That difference would probably far exceed a 1e-100 threshold.
 

Attachments

MrAl

Joined Jun 17, 2014
13,667
Now you are changing the problem. Before, it was that you got one point for each match. Period. Now you get some smaller, but unspecified, amount if there is a mismatch. That makes the feedback value of the score almost meaningless, even to the point of quickly not being able to determine how many scores weren't a perfect match to 100 sig figs.



I don't like your error criterion of 1e-100 because I think it is absurd. Since you claim that you've been doing comparisons to this level for decades, I'm more than willing to change my mind if you can show me a REAL problem in which this was required, and in which a disagreement in two calculations above that threshold actually meant anything. I certainly don't see this very contrived problem as one, though. To describe the diameter of the observable universe (~4.4e+26 m) to the resolution of the diameter of a single proton (~8.4e-16 m) would require only 42 sig figs. Even using the quantum of length, the Planck constant (~1.6e-35 m) would only require 62 sig figs.

Since you stated, "As I said above, I had been using this idea for years now, even before simulators came into popular use. I've detected errors with even small differences like 1e-4, and in the above exercise, 1e-100 (or 1e-50 if you feel more comfortable with that limit). The 1e-4 comes from electrical circuit calculations, the 1e-100 comes from pure numerical number problems." I'd be interested just to see what the size of the smallest circle, to 100 sig figs, that can contain the first 10 circles.
This is a practical example for numerical analysis and geometric techniques, but to frame this as an electronic problem we only have to imagine a circuit with say 10 resistors and calculate the total resistance. If the 'book' result is 5 Ohms and I get 6 Ohms, I can assume I made a mistake, or that the book was wrong to begin with. It could be less of an error though, I may get 5.1 Ohms. Sometimes we write that off as rounding, but other times we look into it to see if we made a mistake. The better idea is to look into it because for example the book may have used 9.9k and I used 10k so the result was off a little. This kind of difference is fairly common really.
[/QUOTE]

Let's use this simple example. What is the effective resistance of a R1=6.8 kΩ resistor in parallel with a R2=2.7 Ω resistor.

I used the Windows calculator and got:

R = 2.6989283666779367016037749717024 Ω

You are saying that if someone else gets a result that differs in that last digit that that is somehow useful in detecting that one of use made an error or doesn't know how to round.



In your red/blue ball example, you are changing things entirely. Here, you are saying that if there is a difference in the most significant bit, we have a discrepancy. But your prior claims are that we don't know if we have a discrepancy if we agree to N bits but that, somehow, it is useful in detecting errors if we disagree to M bits with M >> N. I'm saying that there is a maximum value of M for which this is the case in any useful sense (with M being problem/domain specific).

Here's a more accurate analogy. I lose a red ball, someone comes up and gives me a red ball. But there is a microscopic spec of blue on it, so we need to launch an investigation to determine if it is the same ball or if something happened to put that spec on it. It would be like if I go to pick up my wife at the airport and then questioning if it is really her because she has one more gray hair than when I last saw her (probably more, if she visited her mother). That difference would probably far exceed a 1e-100 threshold.
[/QUOTE]

Hello,

I don't think you realize what you are implying. You mixed the problem of the two balls in with the significant figures problem.
You must know what a binary decision is. It's when you either have one or the other, with no mixing. You either get true or false.
The red/blue ball problem was to simplify what a difference is. This is the most basic way to troubleshoot anything.
It's either a red ball or a blue ball. That's different than deciding if digits are the same because there is more variability there.
It is the same though from the aspect of what a difference is in general. We don't get as much choice though with the binary problem in deciding how precise we want to be because there are only two possibilities.

Now from your example if you get:
R = 2.6989283666779367016037749717024 Ω

and I get:
R = 2.699 Ω

You can 'probably' reason that I rounded and you didn't.
However, if you ask for that many digits and I still return:
R = 2.699

that implies that I got:
R = 2.69900000000000000000000000000000 Ω

which is now considered wrong.
Now if I tell you that I rounded to 4 digits then you might round to 4 digits to see if you get the same result. If you get R=2.699 then you may choose to say that we both rounded so both results are the same. If you don't choose to round however, then my result is still wrong.
Also keep in mind that the longer result was your specification. We then go on to figure out how well we have to match that specification.

Now to loosen up a bit, we may not consider the last digit to matter. If we do, then we have to go into what math package we are using and what version of the software.

Now let's consider what happens if we don't do any of that.
You post:
R = 2.6989283666779367016037749717024 Ω

and I post
R = 2.699 Ω

Do you claim that my result is right or that it is wrong?

In electronics, we can get results like:
R = 2.6989283666779367016037749717024 Ω

if we really want to, but for two resistors in parallel (remember I mentioned the application too) we probably won't do that unless we want to test the math packages of the two users. Testing the math packages is a different test though which could easily require more precision.

As I read your posts it appears that you almost always did 'practical' calculations on real circuits or something like that. I say that because you don't seem to be comfortable with values that have a huge number of digits that have to be correct. This is common with pure mathematics where we might need THOUSANDS of digits to be precise, or we need to generate thousands in order to check some theoretical feature.

In fact, a question about your calculation comes to mind right away. How do we know if:
R = 2.6989283666779367016037749717024 Ω
is correct to the number of digits being displayed by that particular calculator?

We calculate more digits. When I do that I get:
2.698928366677936701603774971702412277478060181986564158348890881561732

and from inspection I can see that your result was good up to that many digits that you used.
Now how do we know that my test value was right? Calculate more digits:
2.6989283666779367016037749717024122774780601819865641583488908815617328413718082526

That looks like my first test result was accurate up to that number of digits. I did not actually check each digit though as normally we would subtract and look at the difference. The difference would have to be smaller than 1e-n where n was the number of digits (or less).
This also comes up when programming a big number library. You anticipate using 50 digits, 100 digits, 1000 digits, or many more digits. I had designed one library that has no limit on the number of digits except for the amount of memory available, but my simpler calculator anticipates up to 50 accurate digits for any calculation because that's all I usually need.

The 1e-100 error I quoted was from memory, it may have only been 1e-64 or even 1e-32 I can't remember the actual event that came from. It was from a math/geometry challenge that took place some years ago. You were challenged to match the results of a mathematician who precalculated all the N circle problems up to the given number of digits. I'll see if I can find some notes I may still have on this.
One of the possible ways of solving these involved a mechanical vibration technique, but I don't remember much about it now.

I have used this technique over and over and over again, and you have too. I have used it a lot in the past to double check circuit analysis results from math calculations by running a simulator and increasing the number of digits so I can compare with the calculations. Often the results match very closely, but if they are off by too much, I double check the calculations and how the simulator might be handling the calculations.
 
Top