Calculating the new beta parameters given two variables
古いコメントを表示
I have two beta distributed random variables with parameters, mu1, alpha1 and beta1 and mu2, alpha2, beta2 for variables A and B. I would like to generate random variable C witth parameters mu3, alpha 3, and beta 3 to use in another computation. How can I go about tthis?
5 件のコメント
Torsten
2023 年 1 月 4 日
If you have the Statistics and Machine Learning Toolbox, you can use
Lewis Waswa
2023 年 1 月 5 日
the cyclist
2023 年 1 月 5 日
@Lewis Waswa, your question and comment are confusing to me. Here are my points of confusion, that it might help to clarify:
- Your original question doesn't mention anything about the third variable being a sum (or any relationship at all) of the first two variables.
- A beta distribution is defined by two, not three parameters. Are you just saying that you also know the mean, and you are certain it is consistent with a and b?
- When you say you "have" two random variables, do you mean you have samples that have been fit, or do you mean you know the parameters?
- There is a (big) difference between [1] the joint distribution of K1 and K2, and [2] the distribution of the sum of K1 and K2. Which do you actually need?
- Are K1 and K2 independent from each other, or are they correlated?
- Are you trying to calculate the parameters of the third variable, or do you just need to generate random values?
I think you may have not thought carefully about these important details, but at the very least you have not told us these important details.
Lewis Waswa
2023 年 1 月 5 日
編集済み: Lewis Waswa
2023 年 1 月 5 日
John D'Errico
2023 年 1 月 5 日
編集済み: John D'Errico
2023 年 1 月 5 日
@the cyclist - some people extend the beta to live on different support, instead of [0,1] or [-1,1]. That can result in either a 3 or 4 parameter beta, depending on the bounds chosen. It is just a shift and/or a scale though, nothing more in that.
As I said, there is no named distribution that represents the sum of two beta random variables. Wanting one will not make it appear.
Alternatively, if you like, there IS a distribution, but it requires 4 parameters (not to mention the support) to represent that distribution. They are the original beta parameters of each of the parents. But that is essentially what I suggested in my answer. If you want to find the sum of two betas, then just start by sampling the two betas, then add them together. Anything else you would do would only be an approximation, and that approximation would often be a terribly poor one. Whereas, my suggestion is in fact the exactly correct distribution, because there are no approximations needed.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
