# Calculate expected value from discrete beta distribution

I have a lookup table in 2 variables, $Z_l$ and $T_l$. So, $Z_l$ and $T_l$ are vectors with same length where $Z_l$ goes from 0 to 1 and $T_l$ varies between 300 and 2000. If you are curious, $Z_l$ contains fuel mixture fractions and $T_l$ contains corresponding flame temperatures.

Now, I need to use this lookup data to calculate $T$ for a few $Z$ values between 0 and 1. The complication here is that this is not exact interpolation. I am given that this $Z$ (that I am supposed to calculate $T$ at) is actually $Z_{mean}$ for a beta distribution with variance $Z^2_v$ which is given. The 2 parameters for beta distribution are also given as functions of mean value and variance.

So, my approach (based on my limited knowledge of statistics) was that I would calculate the beta distribution probability for every value in $Z_l$. Then, I would simply take summation over $T_l$ weighted by probability of corresponding entry in $Z_l$ like this.

$T = \sum_{i=1}^{length(Z_l)} Probability(Z_l(i))\cdot T_l(i)$

Am I doing it right?
If yes, how do I calculate probability for members $Z_l$. I read about beta-binomial distribution which supposedly is discrete form of beta distribution. But I am still not clear. Can someone explain the procedure in brief?

PS: I am doing this in MATLAB.

EDIT 1
About the physics of what I am doing: I want to calculate temperatures in a combustion chamber at 80,000 grid points in XY plane. The temperature depends solely on a parameter $Z$ which varies between 0 and 1. However, at any grid point, I don't know the exact value of $Z$. All I know is it has a beta distribution with $Z_{mean}$ and $Z^2_v$ for every grid point. $Z_{mean}$ and $Z^2_v$ are given and are different for every grid point.
Now, I have a way to calculate $T$ if I knew exact value of $Z$ say as $T=f(Z_{exact})$.
So what I do is take 100 $Z$ values between 0 and 1 and call it $Z_l$ vector. Then for each value in $Z_l$, I calculate $T=f(Z_l(i))$ and I call resulting vector as $T_l$. Essentially, I am building a look up table for $Z$ and $T$.

Now at each grid point:

1. I will need to calculate the likeliness/probability of every member of $Z_l$. This I believe will be given by beta distribution.
2. This will then also be the probability of corresponding member of $T_l$ for the grid point in question.
3. So, I will need to take summation over $T_l$ weighted by probability: $T = \sum_{i=1}^{length(Z_l)} Probability(Z_l(i))\cdot T_l(i)$
• You must define your terms! There is no way we can know what is your Z_I, T_I, and so on. Also, use LaTeX markup! – kjetil b halvorsen Dec 5 '14 at 17:07
• @kjetilbhalvorsen: I updated the question. – tumchaaditya Dec 5 '14 at 17:44
• This is much better, but I still do not understand the role of the beta distribition. Is that based here on some physical theory? Then you should explain that, too. – kjetil b halvorsen Dec 5 '14 at 17:46
• It seems that you have a random design. Usual regression (OLS) is for fixed designs, i.e. when X is known precisely. In your case X is a random matrix itself. T – Aksakal Dec 5 '14 at 17:55
• Actually I am dealing with turbulent combustion. Turbulent stuff always involves an ensemble average of non-turbulent solutions weighted by probability. – tumchaaditya Dec 5 '14 at 18:08