Hint: transformation is 1-1 in the support (1 <x <1). Apply Jacobian rule.
In the long run, we're all dead.
I agree. Sambit just because you're a somewhat regular poster doesn't mean you're exempt from following the guidelines especially those pertaining to homework help. So please show a little work. Tell us what's giving you trouble. You've been here quite a few times and we're glad to help but REALLY try to do the problem first. You don't learn nearly as much when we give you hints along the way, you still learn if we don't just give you the answer. But if you can go through the entire process yourself (even if it takes longer) then you'll get more out of it.
Actually I got stuck at the very beginning. Suppose I want to calculate the distribution of log X from the distribution of X. In such case, we write Y=log X and consequently X=exp(Y) and hence apply the transformation formula using Jacobian etc. But here, Y=3x^2 - 2x^3, so I am unable to write X=f(Y).
@ Dragan and Dason: I don't want direct answer, just the procedure or any help regarding that would be enough.
Oh I understand what your problem is. I was just letting you know for future reference. Sometimes if I get stuck on a problem I like to actually simulate what's going on. I wrote up some R code to simulate from the distribution you gave and then I apply the transformation to see what it looks like the transformations density is.
I'm assuming you're used R before? Maybe not... but anywho it's interesting.Code:# Density to sample from func <- function(x){return(6*(x-x^2))} # Function to do the sampling sampfunc <- function(){ cont <- TRUE x <- 0 while(cont){ x <- runif(1) y <- runif(1,0,1.5) if(y <= func(x)){ cont <- FALSE } } return(x) } # Get a sample from your distribution dat <- replicate(10000, sampfunc()) # Look at the sample hist(dat) # Make the specified transformation trans <- -2*dat^3 + 3*dat^2 # interesting hist(trans)
If you do use R you might get a big hint from what the transformation looks like.
If not I can offer another hint. Do the functional form of the original density and the functional form of the transformation look related in any way? I'm not necessarily talking about a linear transformation or something like that but you should notice a connection. Also you should take note of Vinux's response in the 3rd post. It's quite useful...
Edit: I attached the histograms in case you don't have R.
Last edited by Dason; 02-06-2011 at 12:04 PM. Reason: Added attachments
I just notice that the given pdf is derivative of Y. How does that help?
Regarding R, I know just some introductory calculations in R, like summarization of data, testing, drawing curves etc. As far as I understand, you first define a function. Can't understand the next step.
The next step is a rejection sampling algorithm. I write it get a random sample from the density you provided. There are more efficient ways but this was the quickest thing that came to my mind.
This is true. But there is a nice little trick that once you see makes the problem very simple. Sambit you already mentioned that the density is the derivative of the transformation. Let me phrase that in an equivalent but possibly more useful way.
If the density is the derivative of the transformation that means that the transformation is the integral of the density. What is the integral of a density? The transformation is the CDF of the density. So if F is the cdf and X is a random variable associated with the density then what you're looking at is Y = F(X). Do you know any results related to this?
You are possibly talking about the fact that CDF of any continuous rv follows Uniform distribution...
Well that's close to what I'm talking about. If you apply the CDF of a continuous random variable (with positive probability on its support) to the random itself then you get a uniform r.v. Linky
Tweet |