0
$\begingroup$

I have a (bivariate) spherically symmetric distribution, in the sense that I can generate iid values distributed according to it. But there is a detail - I can't get the generated values as a whole, but only their single component, i.e. x coordinate and not y. So I don't know the underlying distribution - it's an empirical one basically, but I need to generate values from it for different purposes: e.g. estimating distribution of some function f(x, y).

Of course, y has the same distribution as x (which we can generate) - so one would think that we can just generate two iid values and use them for x and y, but this doesn't work: for the underlying distribution to be spherically symmetric x and y have to have some dependence (in general case). So, distribution generated this was will not be symmetric. Simple modifications of this method, like rotating the resulting vector by a random angle, don't seem to help. So, any ideas, suggestions? I couldn't find anything on this topic.

For the sake of example you can think of the underlying distribution as being a multivariate t distribution. But NOT multivariate normal of course, as it is the same as two independent univariate ones.

$\endgroup$
2
  • 1
    $\begingroup$ I can't quite work out what you're asking. Are you saying "given some spherically symmetric distribution, such as a bivariate t distribution, how can I generate (x,y) pairs from it?" $\endgroup$
    – Glen_b
    Oct 29 '16 at 22:52
  • $\begingroup$ Basically yes, but with one detail: I can generate x values from this distribution, how to generate pairs using them? $\endgroup$
    – aplavin
    Oct 30 '16 at 7:37
1
$\begingroup$

I don't entirely follow your question, but maybe I can still help, or at least get you part-way there.

In order for a bivariate distribution to be circularly symmetric, its $Y$-distribution must be the same as its $X$-distribution. Thus, if you know the distribution for $X$, you can use that to generate realized $Y$-values. On the other hand, if you can draw existing realized $X$-values from an existing sample, you could use independent draws from that sample to approximate draws of the sample's $Y$-values. Here is a simple example, coded in R:

set.seed(2614)    # this makes the simulation exactly reproducible
N = 500           # we'll generate 500 data
x = rt(N, df=5)   # x & y will be distributed as t w/ 5 df
y = rt(N, df=5)

range(c(x,y))     # [1] -8.293021  9.571094
SD    = 5/3       # 1.666667
theta = seq(0, 2*pi, length=200)
windows()
  plot(x, y, xlim=c(-10,10), ylim=c(-10,10), col=rgb(.5,.5,.5,.75))
  lines(x=SD*sin(theta),   y=SD*cos(theta),   col="red3")       # plotting circles
  lines(x=2*SD*sin(theta), y=2*SD*cos(theta), col="orangered")

This looks reasonably circularly symmetrical.

enter image description here

Now let's try to figure out what the distribution is from the $X$-variable (to which you have access):

library(fitdistrplus)                   # we'll use this package
xn = fitdist(x, "norm")                 # we'll check the normal distribution
xt = fitdist(x, "t", start=list(df=2))  #  & the t-distribution starting w/ 2 df
summary(xn)
# Fitting of the distribution ' norm ' by maximum likelihood 
# Parameters : 
#         estimate Std. Error
# mean -0.05376445 0.06156805
# sd    1.37670350 0.04353508
# Loglikelihood:  -869.3152   AIC:  1742.63   BIC:  1751.06 
summary(xt)
# Fitting of the distribution ' t ' by maximum likelihood 
# Parameters : 
#    estimate Std. Error
# df 4.512022  0.6678295
# Loglikelihood:  -832.3588   AIC:  1666.718   BIC:  1670.932 
windows()
  plot(xn)

enter image description here

windows()
  plot(xt)

enter image description here

From this, our best guess is that $X$ is distributed as $t$ with $4.5$ degrees of freedom. Let's see what we would have guessed for $Y$, if we had had access to it:

yn = fitdist(y, "norm")
yt = fitdist(y, "t", start=list(df=2))
summary(yn)
# Fitting of the distribution ' norm ' by maximum likelihood 
# Parameters : 
#         estimate Std. Error
# mean -0.03244677 0.05624948
# sd    1.25777662 0.03977428
# Loglikelihood:  -824.1421   AIC:  1652.284   BIC:  1660.713 
summary(yt)
# Fitting of the distribution ' t ' by maximum likelihood 
# Parameters : 
#    estimate Std. Error
# df 5.504327  0.9605105
# Loglikelihood:  -807.3761   AIC:  1616.752   BIC:  1620.967 
# windows()  # plots omitted for brevity
#   plot(yn)
# windows()
#   plot(yt)

It seems we would have guessed $Y$ was distributed as $t$ with $5.5$ degrees of freedom. These two guesses are not far from each other, or from the true data generating process (a $t$-distribution with $5.0$ degrees of freedom).

What if you want to sample from $X$ directly? That works reasonably well, too:

x.gen = sample(x, size=N, replace=TRUE)
y.gen = sample(x, size=N, replace=TRUE)

range(c(x.gen, y.gen))            # [1] -8.293021  9.571094
SD    = sd(c(x.gen, y.gen));  SD  # [1] 1.329146
theta = seq(0, 2*pi, length=200)
windows()
  plot(x.gen, y.gen, xlim=c(-10,10), ylim=c(-10,10), col=rgb(.5,.5,.5,.75))
  lines(x=SD*sin(theta),   y=SD*cos(theta),   col="red3")
  lines(x=2*SD*sin(theta), y=2*SD*cos(theta), col="orangered")

The plot / result doesn't look that bad:

enter image description here

All of these results assume you don't have access to $Y$, but can (correctly) assume that the bivariate distribution is circularly symmetric. We also tend to get good results because I simulated a moderately large dataset—if you had only had, say, $N = 25$ data, the approximations probably wouldn't be very good.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.