Timeline for Median of ratio of independent variates with Beta distributions
Current License: CC BY-SA 3.0
27 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 28, 2015 at 7:52 | comment | added | Glen_b | 1. SLutsky only tells us that if the denominator converges to $c$ the ratio will converge to whatever the numerator converges to divided by $c$. A different result tells us the numerator goes to a normal. 2. An actual theorem for the numerator would establish something of the form $(X_k-\mu_k)/\sigma_k\to N(0,1)$. ... and for that, you should ask a new question. If my claim is true, it's useful as a question in its own right. One way to establish such things would be via properties of the mgf or characteristic function | |
Jul 28, 2015 at 7:37 | comment | added | user3659451 | I get what you're saying. It seemed that you mentioned two things: 1) Slutsky's theorem implies some results around the normality of the ratio of two Beta distributions and 2) more formally if $\rho \cdot k = \alpha_k, k = \beta_k, \rho > 0$, $X_k \sim B(\alpha_k,\beta_k)$ are random variables, then $X_k \rightarrow N(\mu,\sigma^2)$, but I guess what I'm asking is what theorem does this come from? | |
Jul 28, 2015 at 7:25 | comment | added | Glen_b | I will try to move some of this conversation up into my answer when I get a chance. | |
Jul 28, 2015 at 7:25 | comment | added | Glen_b | ctd... If you don't hold alpha/beta constant as the parameters increase you there's not a single value for the spike to converge on -- the thing can wander about anywhere on the positive half-line, which isn't convergence in the required sense. | |
Jul 28, 2015 at 7:24 | comment | added | Glen_b | It's not a theorem that it stays constant. It's something under your control. We're trying to discuss what happens as the parameters become very large.. If you increase them both in proportion, so the ratio is constant, then they converge to a constant value (and we can discuss the properties of the distribution of the ratio of beta variables). If you don't keep them in proportion, neither of the beta variates will converge on a constant value. Recall that it was you who raised the notion of convergence to "a spike". ...ctd | |
Jul 28, 2015 at 2:16 | comment | added | user3659451 | Though by what theorem is the fact that $\beta/\alpha$ staying constant come in? I'm wondering what can be said about the convergence rates and how they depend on the specific ratio. I will add this to another stack exchange question when I get another few minutes. | |
Jul 28, 2015 at 2:14 | comment | added | user3659451 | This actually helps me a lot with what I'm trying to reverse engineer at work. I guess some previous employee was trying to make some assumptions about normality.... Thank you. very very helpful. | |
Jul 28, 2015 at 1:55 | comment | added | Glen_b | As numerator $α,β \to \infty$ and denominator $α,β \to \infty$, asymptotically the ratio should be converging to normal (via Slutsky's theorem and convergence of the numerator to a normal if the ratio of numerator parameters $\beta/\alpha$ stays constant), so once you have the mean and variance via Taylor expansion you should have a good normal approximation to the distribution of the ratio that gets better as your parameters go higher. | |
Jul 28, 2015 at 1:46 | comment | added | Glen_b | In my simulations just now I did $n=10000$. The individual betas, though one can accurately approximate the mean and variance of the ratio for large $\alpha, \beta$ without simulation via Taylor approximation (and higher moments if needed) and in principle check that against the simulation. | |
Jul 28, 2015 at 1:46 | comment | added | user3659451 | And when you say, "as they should" are you referring to the ratio or just the individual Beta rv you're pulling from? | |
Jul 28, 2015 at 1:45 | comment | added | user3659451 | Okay thank you Glen. I think I know how to proceed now. Out of curiosity, what types of values for n did you use when looking at $\alpha, \beta > 10000$? | |
Jul 28, 2015 at 1:41 | comment | added | Glen_b | Your question on MCMC would be a new question (but search, since it may well have been asked and answered). | |
Jul 28, 2015 at 1:40 | comment | added | Glen_b | I just generated a bunch of values with $\alpha=10^{12}$ and $\beta=10^{14}$. The distribution, mean and variance all seem to be as they should. Even $\alpha=10^{16}$ and $\beta=10^{18}$ look okay, but it's about this point that it might be starting to encounter numerical issues (much earlier than getting to this point I'd instead pull out some scale factors from X and Y and simulate from Gaussians). | |
Jul 28, 2015 at 1:39 | comment | added | user3659451 | My next move is likely going to be to do some MCMC, it seems that those types of algorithms have a system in place by which to measure convergence...? I don't really know what to do and am new to this style of calculation. | |
Jul 28, 2015 at 1:38 | comment | added | user3659451 | Interesting... This is helpful.. I'm in a situation where I tried to implement the precise pdf given by the ratio of two independent beta distributions. However this formula which I am using relies on the hypergeometric function, and scipy's implementation of this has been giving floating point errors. This is the reason I went back to this question. I want to empirically estimate the cdf. I can code the algorithm which you described and find an empirical cdf based on this, but my mathematically trained brain feels uncomfortable with this approach because I do not know the true error. | |
Jul 28, 2015 at 1:34 | comment | added | Glen_b | No, since the algorithm above would simulate directly from the nearly-a-spike (perhaps you misunderstand what's going on there, but the algorithm will satisfactorily generate from betas with very high parameter values). It might perhaps be possible to make the parameters large enough that you could run into numerical issues with the algorithm, but at that point you could use direct algebraic approximations to high accuracy (indeed you could effectively write the median down by inspection). | |
Jul 28, 2015 at 1:18 | comment | added | user3659451 | I'm just saying that the simulation you described works well... in general. But imagine if you have a Beta distribution with the alpha and beta parameters sufficiently high.... then you have a pdf which resembles something close to a spike. If your n is not large enough, your algorithm might simply 'skip' over the 'spike'.... | |
Jul 28, 2015 at 1:12 | comment | added | Glen_b | I don't understand what you are getting at there, sorry. | |
Jul 28, 2015 at 1:09 | comment | added | user3659451 | What I mean here is that a general step approach might work for mild looking distributions with a larger variance. | |
Jul 28, 2015 at 1:00 | comment | added | user3659451 | This looks nice, however my concern is what happens when we have very steep looking pdf's and I am interested in using some general approach where the beta distributions get arbitrarily steep.... | |
Jul 28, 2015 at 0:31 | comment | added | Glen_b | the essential steps of my algorithm were 1. generate $n$ x-values from a beta (skewed left) 2. generate $n$ y-values from a beta (skewed right). 3. Compute the ratios ($U_i=X_i/Y_i$) and find the median, (and plot). I also computed $V_i=Y_i/X_i$ to get the distribution of another ratio. $X_i$ and $Y_i$ will be effectively independent, as will $X_i$ and $X_j$ (and similarly for $Y$). So now $U_i$ and $U_{j\,\{j\neq i\}}$ should be independent as well. (While $U_i$ and $V_i$ will be dependent, that doesn't really impact what we're checking for here.) | |
Jul 27, 2015 at 20:41 | comment | added | user3659451 | Thanks -- I'm trying to do the same thing in Python but having some trouble.... will figure it out! | |
Jul 27, 2015 at 19:00 | history | edited | Glen_b | CC BY-SA 3.0 |
added 12 characters in body
|
Jul 27, 2015 at 18:55 | comment | added | Glen_b | Sorry, I should have said that's R. Those are all R functions. Variates are generated independently* by default ... you have to make them dependent. *(more strictly, pseudorandom numbers are not truly perfectly independent, but they're constructed in such a way that make them behave for essentially any purpose like this as if they were independent; they'll be as independent as scipy's random generation will be) | |
Jul 27, 2015 at 18:20 | comment | added | user3659451 | Also,, how do we know that the ratio you computed assumes independence of the random variables? | |
Jul 27, 2015 at 18:18 | comment | added | user3659451 |
Hi Glen_b, what are you using to generate this. Where do the functions rbeta , plot , ecdf , lines , median , and abline come from?
|
|
Jul 17, 2015 at 11:07 | history | answered | Glen_b | CC BY-SA 3.0 |