Select Page

# Variance and Covariance

Optuma Forums Optuma Scripting Variance and Covariance

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

Viewing 1 post (of 1 total)
• Author
Posts
• #50743

Mathew
• Topics: 16
• Replies: 1,018
• Posts: 1,034

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.

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.