# Calculating Variance of Eq. with random variables

1. Mar 13, 2014

### shakystew

1. The problem statement, all variables and given/known data

I am attempting to calculate a heat transfer across a medium with known material properties. I have the equation and all but one variable I have an exact answer for. I require the variance of my answer.

2. Relevant equations

I know ALL variables (ie numerical value) except the the last h. So far, using some engineering parameters for the problem, I have estimated the value by taking 10% perturbations of the normal value of h (that is, the value is usually ~3.0 for this problem, and I have used logic to say that with the additional medium, the value will only affect AT GREATEST +/- 10%).

I am unsure on how to actually calculate the value now. I have ran the equation in MATLAB using random number generator from 2.7-3.3 (10% perturbations) with 1E9 histories. Can I use this value to get the variance? (The output is not normal/gaussian).

Last edited: Mar 13, 2014
2. Mar 13, 2014

### jbunniii

Assuming everything except $h$ is constant, the variance is simply
$$\text{var}\Delta T = \left(\frac{q'}{2\pi R_{00}}\right)^2 \text{var}\left(\frac{1}{h}\right)$$
This follows from the following basic property of variance: if $x$ is a random variable and $a$ and $b$ are constants, then $\text{var}(a(x+b)) = a^2 \text{var}(x)$. In other words, the constant offset $b$ does not affect the variance, and the multiplicative scale factor $a$ multiplies the variance by $a^2$.

There is no general property relating $\text{var}(1/h)$ to $\text{var}(h)$. How they relate depends on how $h$ is distributed. You can start with the definition of variance:

$$\text{var}\left(\frac{1}{h}\right) = E\left[\left(\frac{1}{h}\right)^2\right] - \left(E\left[\frac{1}{h}\right]\right)^2$$

where the expected values are calculated in the usual way using the integral definition. It looks like you are assuming that $h$ is uniformly distributed in the interval $[2.7, 3.3]$, so you should be able to get a closed form answer without resorting to numerical approximation.

3. Mar 13, 2014

### shakystew

Creating a PDF for such variable

Thank you jbunniii for the quick response!

If I didn't know the value of h, how could I make a PDF for such variable? Wouldn't that require an equation of h to find such parameters? Or, if I do use those contraints from |2.7 , 3.3|, how would I go about making a PFD?

My advisor said I should first make a triangular distribution of the variable. To use a triangular distribution, I must know the aand b (where the value is zero) as well as the peak value, c.

4. Mar 13, 2014

### jbunniii

There's no general answer to this - it depends on your specific problem. Where are the values of $h$ coming from? Do you have some measurement data? If so, you can try fitting a distribution to the data. [Sorry, I'm not an expert regarding how to do that, but I know there are statistical methods for doing this.]

Or maybe you just know that the value cannot be smaller than $2.7$ or larger than $3.3$, so the distribution must be constrained to that interval. If you know nothing else, a uniform distribution in that interval may be reasonable. If you think the average $3.0$is more likely than $2.7$ or $3.3$, then a triangle or some other "peaked" distribution may be reasonable.

If you only know a mean and a variance for $h$ then a normal/gaussian assumption may be reasonable. It all depends on what you know about $h$.