# Observed varialbe set to a distribution

• ### Question

• Hello all

When I have the observed values for a double variable as a distribution (and not a fixed point) what can I do about it?

For example in this code, can we use some Gaussian distribution instead of fixed observed values? If we know traffic sensors are themselves noisy so observed data is not exact.

```            Variable<double> trafficMean = Variable.GaussianFromMeanAndPrecision(0, 0.01);
Variable<double> trafficNoie = Variable.GammaFromShapeAndScale(1, 1000);
Range r = new Range(10);
VariableArray<double> trafficData = Variable.Array<double>(r);
using (Variable.ForEach(r))
{
trafficData[r] = Variable.GaussianFromMeanAndPrecision(trafficMean, trafficNoie);
}
trafficData.ObservedValue = new double[] { 1, 3, 2, 3.2, 6, 7, 3, 2, 3, 1};
InferenceEngine ie = new InferenceEngine();
Console.WriteLine("Mean posterior = "+ie.Infer(trafficMean) + "\nPrecision posterior = "+ ie.Infer(trafficNoie));```

Monday, February 2, 2015 9:44 PM