Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Calculating the error in <x^2> from the error in <x> (Molecular Dynamics)

  1. Apr 27, 2016 #1
    Hi, does anyone know of an easy way to calculate the error in <x^2> from the error in <x>? I am running a molecular dynamics simulation and trying to work out the error in the fluctuation of kinetic energy <dEk> = <3/2NT^2> - <3/2NT>^2 from the error in <T>.

    Thanks in advance
     
  2. jcsd
  3. Apr 27, 2016 #2

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You say you have the error in <T> ? Is'n that the same as ##<\sigma^2> = <(T-<T>)^2> = <T^2> - (<T>)^2 \ \ ## ?
     
  4. Apr 27, 2016 #3
    Yes, I have the standard error in the mean of T but I also need the error in the mean of T^2
     
  5. Apr 27, 2016 #4

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    So you don't just want the spread <dEk> but also the error in this spread ? Doesn't that depend on the size of the system ?

    [edit] adding: can't you use something like $${\sigma_{T^2}\over T^2 } = 2 {\sigma_T \over T} \ \ \ \rm ?$$
     
  6. Apr 27, 2016 #5
    I think so, this is what I'm having difficulty with. There must be error in <dEk> because there is error in <T>?
     
  7. Apr 27, 2016 #6
    [edit] adding: can't you use something like $${\sigma_{T^2}\over T^2 } = 2 {\sigma_T \over T} \ \ \ \rm ?$$[/QUOTE]
    I know of this formula but I wasn't sure if it would work with the error being in the average of T...
     
  8. Apr 27, 2016 #7

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I suppose you are doing something very sophisticated ?
    The Maxwell Boltzmann distribution has well-defined characteristics with 'exact' ##\sigma##. It's only when you generate samples, that the error in such ##\sigma## (determined from the sample) comes into the picture ?
     
  9. Apr 27, 2016 #8
    Well I'm using a molecular dynamics program to determine a set of T values over time, so I get some fluctuation about the average T and I've worked out the error in the average of T. The problem is that I now need the error in <dEk> which I think needs the error in T but I'm not completely sure.. :confused:
     
  10. Apr 27, 2016 #9

    Dale

    Staff: Mentor

  11. Apr 27, 2016 #10
    I've looked at this carefully but I am still unsure and can't seem to find any information of whether these formulas work for errors in the mean of quantities. For example, I'm not sure that

    d<T^2>/<T^2> = 2d<T>/<T>
     
  12. Apr 27, 2016 #11

    Dale

    Staff: Mentor

    Hmm, I can't answer for certain, but when I have been in similar situations I would just generate 10000 normally distributed numbers and see if the formula works.

    It probably depends on the mean, so you might try mean 100, variance 9 or something similar.
     
  13. Apr 27, 2016 #12
    Ah that sounds like a good plan, thanks for your advice
     
  14. Apr 27, 2016 #13

    Dale

    Staff: Mentor

    You are welcome. Sometimes a few simulations are nearly as good as a proof.
     
  15. Apr 27, 2016 #14

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Looks a bit like sample mean sigma ##\sigma_m## is ##\displaystyle \sigma_{\rm\ population}\over \sqrt N## and since you only have the sample it's ##\displaystyle \sigma_m## is ##\displaystyle\sigma_{\rm\ sample}\over \sqrt {n-1}##.

    Fill us in on the result of Dale's suggestion ! :smile: My bet is on the simplest guess: double the relative error in T to get the relative error in T2
     
  16. Apr 27, 2016 #15

    FactChecker

    User Avatar
    Science Advisor
    Gold Member

    I think using (x+ε)2 = x2+2xε+ε2 would give the answer that the error would be 2[itex]\bar{x}[/itex]ε + ε2
    But I do agree that a simulation would be the best way to confirm a result one way or another.

    EDIT (CORRECTION): Since the error, ε, will be randomly positive or negative, I think the 2xε term will have an expected value of 0. So that leaves just ε2, which I think many others have already said. (But 2xε the term can increase the variance of the error greatly, depending on the magnitude of x.)
     
    Last edited: Apr 27, 2016
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Calculating the error in <x^2> from the error in <x> (Molecular Dynamics)
  1. Error calculation (Replies: 2)

  2. Error Calculation (Replies: 6)

Loading...