concept variance in category f#

appears as: varice, varice
F# Deep Dives

This is an excerpt from Manning's book F# Deep Dives.

This example is slightly artificial, because there are F# functions for calculating variance and mean. But it demonstrates the idea—if you have a more complex function written in another language, the type-provider mechanism allows you to call it easily. An important aspect that can’t be shown well in print is that you also get full development environment support. When you type R followed by a dot, the editor shows you a list of all available functions (based on the information provided by the R type-provider).

Having described expectation, let’s proceed to another important characteristic of X: variance, which plays a key role when later in this chapter we talk about how to measure and improve the accuracy of the Monte Carlo simulation.

As for computation of variance, you’ll use the extension method Variance() from MathNet.Numerics. The following example shows how:

Now that you know how to observe the expectation and variance of a set of samples, let’s move on to producing those samples. You want them to follow a particular probability distribution.