Error propagation - partial derivative?

Click For Summary

Discussion Overview

The discussion revolves around the appropriate method for calculating error propagation in the expression Z = B * Cos(θ), specifically in the context of a Williamson Hall plot. Participants explore whether to use partial derivative error propagation or a standard relative error formula, considering the errors associated with B and θ.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses confusion about which error propagation method to use for Z = B * Cos(θ), questioning the need for partial derivatives.
  • Another participant suggests that if the error in Cos(θ) is known, either formula should yield the same result, and that the second formula can be derived from the first.
  • A participant mentions having both an error in θ and an error in Cos(θ) but finds that the partial derivative method gives a larger error than the standard method, leading to a preference for the latter.
  • Some participants discuss the implications of treating Cos(θ) as a constant if the error is measured in Cos(θ) rather than θ.
  • One participant provides a detailed example to illustrate that both methods should yield the same result if calculated correctly, questioning whether the use of degrees instead of radians might be causing discrepancies.
  • Another participant confirms that they initially used degrees for θ, which led to mismatched results, but later reconciled the errors from both formulas.

Areas of Agreement / Disagreement

Participants do not reach a consensus on which method is preferable, as some favor the partial derivative approach while others prefer the standard relative error method. Discrepancies in results lead to further exploration of the calculations involved.

Contextual Notes

Participants mention specific assumptions regarding the measurement of errors in θ and Cos(θ), and the potential impact of using degrees versus radians on the calculations. There is an acknowledgment of the need for careful calculation to ensure consistency between methods.

izzy93
Messages
34
Reaction score
0
I am getting a little confused on which error propagation to use:

I am looking to calculate the error in B*Cos(θ) , for the vertical axis of a williamson hall plot. where B is fwhm of a peak with it's own error and cos of the bragg angle

I am unsure of whether i need to use partial derivative error propagation

let Z= B*cos(θ)

then ΔZ =[ ((dZ/dB)^2 *(ΔB)^2 ) +((dZ/dcosθ)^2 (Δcosθ)^2) ]^0.5

or standard way

Δz = [ (ΔB/B)^2 +(Δcosθ/cosθ)^2 ]0.5 * Z

Any clarification on this would be much appreciated,
thanks
http://file://localhost/Users/isabellasharpley/Library/Caches/TemporaryItems/msoclip/0/clip_image001.gif
 
Last edited by a moderator:
Physics news on Phys.org
Did you measure the error in θ or the error in cos θ?

If you have the error in cos θ, then either of your two formulas should work. They should give the same result. In fact, you can derive the second formula from the first one.

If you have the error in θ instead, then you need a formula similar to your first formula, but using dZ/dθ and Δθ instead of dZ/d(cos θ) and Δ(cos θ).
 
Hi jtbell,

thanks for your response.

I have an error in θ and also worked out the error in cosθ as Δcosθ = sinθ Δθ.

the thing is partial derivative formulas (which give the same result) gives me a much larger error compared to the other one, so I'm inclined to go with that one...
 
If the error was measured in, or converted to Cosθ you should not need to differentiate to – Sinθ as the value of Cosθ is just treated as a constant.
 
<br /> Z\quad =\quad B\quad \times \quad Cos\theta \\ \frac { \delta Z }{ \delta B } \quad =\quad Cos\theta \\ \frac { \delta Z }{ \delta (Cos\theta ) } \quad =\quad B\\ \\ \Delta Z\quad =\quad (B\quad \times \quad \Delta Cos\theta )\quad +\quad (Cos\theta \quad \times \quad \Delta B)\\<br /> <br />
 
izzy93 said:
I have an error in θ and also worked out the error in cosθ as Δcosθ = sinθ Δθ.

OK.

the thing is partial derivative formulas (which give the same result) gives me a much larger error compared to the other one

Then you're calculating one of them wrong. They should give the same result if you calculate them properly. (I made up an example for myself and verified this.) Show your work and someone can probably tell you where you went wrong.
 
thanks Tom_k - So when I compute cos of theta (the bragg angle which has an associated error) the error in it is just the error in theta?

Even When I put that value in the ordinary error propagation equation, it does not come out equal to the errors in the partial derivatives:

z= B*Cosθ

then error via

Δz= Z* [(ΔB/B)2+(Δcosθ/cosθ)2]1/2

gives a different result to

ΔZ = [ ((δZ/δθ)^2 (Δθ)^2) + ((cosθ)^2 (ΔB)^2) ]1/2 = [(Bsinθ)2 (Δθ)2 + (cosθ)2 (ΔB)2 ]1/2

but either can be used for the error so I am going to use the first equation here...
 
You haven't shown a sample calculation which demonstrates how the two formulas give different results, but I'll make a wild-assed crazy guess as to why they're different. Are you using degrees instead of radians for θ?
 
Last edited:
izzy93 said:
thanks Tom_k - So when I compute cos of theta (the bragg angle which has an associated error) the error in it is just the error in theta?

Even When I put that value in the ordinary error propagation equation, it does not come out equal to the errors in the partial derivatives:

z= B*Cosθ

then error via

Δz= Z* [(ΔB/B)2+(Δcosθ/cosθ)2]1/2

gives a different result to

ΔZ = [ ((δZ/δθ)^2 (Δθ)^2) + ((cosθ)^2 (ΔB)^2) ]1/2 = [(Bsinθ)2 (Δθ)2 + (cosθ)2 (ΔB)2 ]1/2

but either can be used for the error so I am going to use the first equation here...

You must get exactly the same result using both methods.
I will work out a simple example for you.
Say measurement errors cause B to be measured as 19 mm instead of 20 mm
And Cosθ is measured as 0.52 rad (29.7738 deg) instead of 0.5236 rad (30 deg)
ΔB = 1mm = 0.05B ΔCos0 = 0.0036 rad = .0069 Cosθ
Using partial derivatives:

\\ \frac { \delta Z }{ \delta B } \quad =\quad Cos\theta \\ \frac { \delta Z }{ \delta (Cos\theta ) } \quad =\quad B\\ \\ \Delta Z\quad =\quad (B\quad \times \quad \Delta Cos\theta )\quad +\quad (Cos\theta \quad \times \quad \Delta B)\\ \Delta Z\quad =\quad \sqrt { (B\times 0.0069Cos\theta )\^ 2\quad +\quad (Cos\vartheta \times 0.05B)\^ 2 } \\ \Delta Z\quad =\quad 0.0505Z\\

Using other method:

\Delta Z\quad =\sqrt { (\frac { \Delta B }{ B } )\^ 2\quad +\quad (\frac { \Delta Cos\vartheta }{ Cos\vartheta } )\^ 2 } \times \quad Z\\ \Delta Z\quad =\quad \sqrt { (\frac { 1 }{ 20 } )\^ 2\quad +\quad (\frac { .0036 }{ .5236 } )\^ 2 } \quad \times \quad Z\\ \Delta Z\quad =\quad 0.0505Z\\
 
  • #10
Yes I had the θ error in degrees JTBell! oops

Thankyou Tom K, I finally got the errors from both formulas matching!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K