725 reputation
37
bio website
location
age
visits member for 2 years, 10 months
seen Apr 16 at 21:11
stats profile views 74

Apr
7
comment Minimum of two exponential variates: What's wrong with this derivation?
The distribution of $X$ conditional on the fact that it is less than $Y$ is not the same as the distribution of $X$.
Apr
1
comment What are the distributions on the positive k-dimensional quadrant with parametrizable covariance matrix?
@Xi'an You are correct, I did not process them as parameters of the exponential family. Doing so would have made the family no longer a natural family, and including them would have just muddled the algebra for comuting the moment equations (which was muddled enough to begin with).
Apr
1
comment What are the distributions on the positive k-dimensional quadrant with parametrizable covariance matrix?
@xian There are the 6 exponents $e_i$ and $f_i$ as well.
Mar
31
comment What are the distributions on the positive k-dimensional quadrant with parametrizable covariance matrix?
One way of slighly extending this is to consider the natural exponential family $$f(\mathbf{X}|\mathbf\theta)=h(\mathbf{x})e^{\mathbf\theta^T\mathbf{X}-A(\mathb‌​f\theta)}.$$ Then the mean and covariance are the gradient and Hessian of $A$. If $h$ is a polynomial (with real exponents > -1) then $A$ is the log of a polynomial (with real exponents), and the variance and Hessian are rational functions. I think this gives enough freedom to represent any mean and covariance matrix.
Mar
22
comment Results on Monte Carlo estimates produced by importance sampling
@Xi'an You are quite welcome. (In case it is not clear, I meant no offense. Quite the opposite).
Mar
22
comment Results on Monte Carlo estimates produced by importance sampling
@BerkUstun The capital G is a typo for a small that I will fix promptly. X/Y is just a generic ratio of random variables. IIRC all this is explained in Liu's Monte Carlo book (something with scientific in the title.)
Mar
22
comment What is the probability of rolling all faces of a die after n number of rolls
this is crossposted to math.se. Also the fractions in brackets are flipped.
Mar
21
comment Results on Monte Carlo estimates produced by importance sampling
Even if this was not the OP's intention, I would be interested in some pointers on how to figure out when self-normalization will go horribly wrong.
Mar
21
comment Results on Monte Carlo estimates produced by importance sampling
I suspect, given that the OP is reporting small variance estimators that are biased, but seem to have small variance, that he may be asking about self normalized importance sampling. See Radford Neal's rant on the Harmonic mean estimator for a good example, that takes what would be an importance sampling estimate with 0 variance, and returns nonsense. I am not certain that this does not ever occur in regular importance sampling, but it is certainly rare.
Mar
4
comment Need help on Gibbs sampling with truncated normal and gamma
In your case with mean $\beta$ and variance $1/\lambda$, you truncate at 0 and $\infty$. So after translating to the standard normal your $a$ and $b$ are $-\beta\sqrt{lambda}$ and $\infty$ respectively. You will note that $1-\Phi(-\beta\sqrt{\lambda})$ occurs in the denominator of your function. Just as an aside, it would probably be well worth your while spending a week or so reviewing your probability. If you are playing in this swamp without a good knowledge of the distributions and transformations, the alligators are going to eat you alive.
Mar
4
comment Need help on Gibbs sampling with truncated normal and gamma
Yes, sort of. I am working with standard normals, it is just a linear transformation to get to any other normal.
Feb
27
comment How to compute importance sampling?
@Xi'an Sorry to bother you again, but your definition of h contain the t distribution, when it should just have the $\sqrt{|x/(1-x)|}$. This causes all the estimates to be off because you are multiplying by f^2 instead of f. The approximations should be around 1.015, while they are around 0.25.
Feb
25
comment How to compute importance sampling?
The problems with the variance are akin to the game where you win $2^n/n$ dollars with probability $2^{-n}$. The expected payout may be infinite, but I am not about to sell my house to play. With the folded gamma there will be large excursions, but they will be extremely rare. In practice using $\frac{\sum hf/g}{\sum f/g}$ with the folded gamma performs worse, although in theory it has finite variance.
Feb
25
comment How to compute importance sampling?
Here the definition of sam3 takes 5 times as many samples as the other tests. This makes the folded Gamma look better than the Cauchy-power mixture, while the reverse is true. The folded Gamma estimator has infinite variance, while the Cauchy-power mixture does not.
Feb
18
comment Stats book suggestions
Perhaps, you could say a bit more about the level you are interested in. Are you comfortable with measure theoretic probability? What do you not like about Wasserman's style? The fact that there are theorems and proofs, or the fact that the proofs are sketchy? What exactly are you looking for? I'm not sure what theorem style has to do with QQ-plots. You might look at Hogg McKean and Craig it does cover the Wilcoxon test.
Feb
16
comment Count data and binomial distribution
If you are throwing $n$ balls into $10^6$ bins where each bin is equally likely then the number of balls that end up going into a specific bin has a $\text{Binomial}(n,10^{-6})$ distribution. This can be approximated by a $\text{Poisson}(n/10^6)$ distribution, extremely well approximated if you are throwing millions of balls.
Feb
15
comment How does linear discriminant analysis reduce the dimensions?
The $K$ centroids lie in an at most $K-1$ dimensional affine subspace. For example, two points lie on a line, a $2-1$ dimensional subspace. This is just the definition of an affine subspace and some elementary linear algebra.
Feb
14
comment Odds of drawing at least k identical values among m after n draws?
I have added code that performs the normal approximation from the paper at the end of my answer (it was too big to fit here). I get $p(3000, 300, 20)\approx 0.6468276$ (an error of about 0.0005).
Feb
13
comment Odds of drawing at least k identical values among m after n draws?
@whuber I've been bitten by that error in the past. This is one place where having 1 based arrays is hazardous. I wish there was some way to get it to complain if out of range values were encountered. Functions that silently ignore 'bad' input are dangerous.
Feb
13
comment Odds of drawing at least k identical values among m after n draws?
Quoting from the help page for tabulate "There is a bin for each of the values '1, ..., nbins'; values outside that range and 'NA's are (silently) ignored." I believe that your function should read something like t <- table(replicate(nIterations, any(tabulate(floor(runif(n, min=0, max=m)) + 1) >= k)))