**Ali Yaghoubi posted on 03-07-2011 1:27 PM**

Hi Dear John,

In the first part of codes,maybe the data variablearray after being observed will be replaced with

individual Gaussian based random variables in the code after.

So, will the primary observed value be deleted while running the inference?

And what the roll of the data is here?

```
VariableArray<double>
data = Variable.Observed(new
double[] { 11, 5, 8, 9 });
```

Range i = data.Range;

data[i] = Variable.GaussianFromMeanAndPrecision(mean, precision).ForEach(i);

...

```
InferenceEngine engine =
new
InferenceEngine(new
VariationalMessagePassing());
```

// Retrieve the posterior distributions

Gaussian marginalMean = engine.Infer<Gaussian>(mean);

Gamma marginalPrecision = engine.Infer<Gamma>(precision);

Appreciating your guidance

Thanks