Results 1 to 4 of 4

Math Help - Negative Variance - help!

  1. #1
    Newbie
    Joined
    Aug 2010
    Posts
    2

    Negative Variance - help!

    I'm currently writing up a scientific project and I've come to a complete standstill when calculating the variance. The formula I am using to calculate Variance (from the textbook) is one that is obtained from Linear regression theory as the variance of the slope of the regression. (apparently anyway!)

    I have to do the calculations for 3 different data sets. First two - no problem. Third one.. I am getting a negative value. I've gone over and over and over double checking that I haven't mis-calculated anything but I definitely haven't. What's going on?!! I am SO stuck!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Mar 2008
    Posts
    934
    Thanks
    33
    Awards
    1
    If you are sure you haven't made a mistake, the "negative variance" could be due to round-off error. I suppose you are using the textbook formula based on the sum of the X's and the sum of their squares. If so, try this instead.

    First compute \bar{x} = \sum_{i=1}^n x_i.

    Then compute var(x) = \sum_{i=1}^n (x_i - \bar{x})^2.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2010
    Posts
    2
    Thanks for your reply! I understand what you are saying and understand those formulas you have given me. However.... the formulas I am using are adapted specifically for Ecology and my methodology. I know the two formulas must be linked and one derived from the other, but I cannot figure out how.

    I have attached the formulas to this post here.. Negative Variance - help!-ecology-formula.jpg

    To make sense of that formula, essentially what I have done is a mark-recapture biological study on a population of animals.

    Ct = total number of individuals caught in sample t
    Rt = Number of individuals already marked when caught in sample t
    Ut= Number of individuals marked for the first time and released in sample t
    Mt = Number of marked individuals in the population just before sample t is taken.

    So essentially, using the variance formula given in that attachment.. I am getting a negative result, and not being a Maths student I just can't figure out the reasoning why. Does the formula shed any light?!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Mar 2008
    Posts
    934
    Thanks
    33
    Awards
    1
    Given your formula, it still seems to me that you might get a "negative variance" due to round-off error, but I don't see a quick fix in this case, unlike in my initial post.

    It might help to know if the variance you compute is a "small" negative number by comparison with your raw data. That would lend support to the theory that it's due to round-off.

    You haven't said how you are doing your calculations. Are you using a hand calculator, a computer, or what? If you know how to use a spreadsheet and have Microsoft Excel, you might try doing the calculations in Excel. Excel uses double precision in all its calculations so there is very little round-off.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. problem in negative negative exponential distribution
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: July 4th 2011, 09:29 AM
  2. negative variance... (getting correlation from joint density)
    Posted in the Advanced Statistics Forum
    Replies: 5
    Last Post: January 24th 2011, 11:27 PM
  3. Replies: 2
    Last Post: March 26th 2009, 06:30 PM
  4. Replies: 5
    Last Post: March 26th 2009, 04:36 PM
  5. negative fractions to negative exponents
    Posted in the Algebra Forum
    Replies: 2
    Last Post: September 24th 2006, 07:02 PM

Search Tags


/mathhelpforum @mathhelpforum