Variance and Covariance

Optuma Forums Optuma Scripting Variance and Covariance

This topic contains 0 replies, has 1 voice, and was last updated by Mathew Mathew 1 month, 4 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #50743
    Mathew
    Mathew
    • Topics: 16
    • Replies: 919
    • Posts: 935

    We had a question come in on how to do variance and covariance in scripting. So I thought I would put the answers in here for anyone else who is interested.

    Variance

    This is simply taking an average and then for each data point measuring the distance from that close to the average. We square the value to remove the sign.

    var

    Covariance

    This is trying to find how two datasets move in parallel. It is the combined variance of x & y from their respective averages. ​

    Note that I have not got anything to compare this with, so let me know if you find examples that show this script to need adjusting.

    Hopefully that helps if you are doing this type of work.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close