Calculating the new beta parameters given two variables
Afficher commentaires plus anciens
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 commentaires
Torsten
le 4 Jan 2023
If you have the Statistics and Machine Learning Toolbox, you can use
Lewis Waswa
le 5 Jan 2023
the cyclist
le 5 Jan 2023
@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
le 5 Jan 2023
Modifié(e) : Lewis Waswa
le 5 Jan 2023
John D'Errico
le 5 Jan 2023
Modifié(e) : John D'Errico
le 5 Jan 2023
@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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Exponential Distribution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
