# Calculations with distributions of variables only

4 ビュー (過去 30 日間)
Antoine 2024 年 7 月 9 日

Hi,
I would like to define the distribution of some variables for a design and then calculate the output distribution.
Let make a simple example:
Vout = Vref*(R1/R2 + 1). Now I know the distribution of R1, R2 and Vref, and I would like to know the distibution (mean and variance) of the result. Here I could make it rather quickly on myself, but most of the time I have much more complex designs, with more variables and calculation steps.
Is there a way to define distributions in variables and then work/calculate with them to get the output distribution ?
Thanks community !

サインインしてコメントする。

### 回答 (2 件)

Torsten 2024 年 7 月 9 日
Look up "Monte-Carlo-Simulation".
##### 0 件のコメント-2 件の古いコメントを表示-2 件の古いコメントを非表示

サインインしてコメントする。

John D'Errico 2024 年 7 月 9 日
Um, yes. And, no.
Firstly, very likely there will be no "named" distribution for even such a simple expression. And depending on the distributions of the components, there are good chances you cannot even compute simple things like the theoretical mean or the variance. If the expression were more complicated, then certainly there would be nothing you can do in any analytical form.
For example, if R1 and R2 were assumed to have normal distributions, then the ratio of R1/R2 has (as I recall) a Cauchy distribution, but a Cauchy lacks moments you can compute, so the mean and the variance are undefined. If you then multiply that by another variable Vref, then you won't even have any classical distribution.
Much of this lies in the realm of a branch of statistics sometimes called statistical tolerancing. That is, given a set of variables (X,Y,Z,...) compute the distribution of some function of those variables. And this is exactly your question.
There are many schemes you can use for this
1. Monte Carlo simulation
2. Truncated Taylor series approximations
3. Taguchi syle methods
4. Modified Taguchi methods (I wrote a couple of papers on them many years ago.)
All of these will surely fail to produce anything of value, IF the variable R2 has any appreciable probability of being near zero.
So at best, what you wil do is try to compute the population moments of the function F(X,Y,Z,...), so the mean, variance, skewness, kurtosis, etc. Then you can hope to find a distribution that fits those moments.
OR, if you are using a Monte carlo scheme, you will generate a large sample of values of F, and then use a tool to find a distribution that fits it. That would involve things like the distfit tool.
##### 1 件のコメント-1 件の古いコメントを表示-1 件の古いコメントを非表示
Torsten 2024 年 7 月 9 日

OR, if you are using a Monte carlo scheme, you will generate a large sample of values of F, and then use a tool to find a distribution that fits it. That would involve things like the distfit tool.
Usually, the empirical distribution (pdf or cdf) directly derived from the simulation is taken. For complex outputs, getting a suitable known distribution to fit the outcome to will be almost impossible.

サインインしてコメントする。

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by