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에서 Exponential Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
