+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17

Thread: transformation problem

  1. #1
    Points: 3,992, Level: 40
    Level completed: 21%, Points required for next Level: 158

    Posts
    73
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question transformation problem




    If f_X(x)=6(x-x^2) , 0<x<1, find the distribution of Y=3X^2-2X^3

  2. #2
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post
    If f_X(x)=6(x-x^2) , 0<x<1, find the distribution of Y=3X^2-2X^3
    Do you want me to just provide you with the answer?

  3. #3
    Dark Knight
    Points: 6,762, Level: 54
    Level completed: 6%, Points required for next Level: 188
    vinux's Avatar
    Posts
    2,011
    Thanks
    52
    Thanked 241 Times in 205 Posts

    Re: transformation problem

    Hint: transformation is 1-1 in the support (1 <x <1). Apply Jacobian rule.
    In the long run, we're all dead.

  4. #4
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    Quote Originally Posted by Dragan View Post
    Do you want me to just provide you with the answer?
    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.

  5. #5
    Points: 3,992, Level: 40
    Level completed: 21%, Points required for next Level: 158

    Posts
    73
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: transformation problem

    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.

  6. #6
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post
    @ Dragan and Dason: I don't want direct answer, just the procedure or any help regarding that would be enough.
    Even so we would appreciate if you show a little work or at least tell us where you got stuck. I still propose that reading and following the guidelines that TheEcologist kindly wrote up is a good thing.

  7. #7
    Points: 3,992, Level: 40
    Level completed: 21%, Points required for next Level: 158

    Posts
    73
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post
    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, and I am unable to write X=f(Y).
    This is my problem, Dason.

    ......I know the distribution of X. But in order to get the distribution of Y, I need to substitute X in terms of Y in the given pdf, which I can't. Got the point?

  8. #8
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post
    This is my problem, Dason.

    ......I know the distribution of X. But in order to get the distribution of Y, I need to substitute X in terms of Y in the given pdf, which I can't. Got the point?
    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.
    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)
    I'm assuming you're used R before? Maybe not... but anywho it's interesting.


    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.
    Attached Images
    Last edited by Dason; 02-06-2011 at 12:04 PM. Reason: Added attachments

  9. #9
    Points: 3,992, Level: 40
    Level completed: 21%, Points required for next Level: 158

    Posts
    73
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: transformation problem

    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.

  10. #10
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    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.

  11. #11
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post

    But here, Y=3x^2 - 2x^3, so I am unable to write X=f(Y).

    Sambit, you should have said this in your original post. Anyway, try this

    x=f(y)=\frac{1}{2}-\frac{1}{2\left ( 2\sqrt{y^{2}-y}+2y-1 \right )^{\frac{1}{3}}}-\frac{1}{2}\left ( 2\sqrt{y^{2}-y}+2y-1 \right )^{\frac{1}{3}}.

  12. #12
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    Quote Originally Posted by Dragan View Post
    Sambit, you should have said this in your original post. Anyway, try this

    x=f(y)=\frac{1}{2}-\frac{1}{2\left ( 2\sqrt{y^{2}-y}+2y-1 \right )^{\frac{1}{3}}}-\frac{1}{2}\left ( 2\sqrt{y^{2}-y}+2y-1 \right )^{\frac{1}{3}}.
    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?

  13. #13
    Points: 3,992, Level: 40
    Level completed: 21%, Points required for next Level: 158

    Posts
    73
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: transformation problem

    You are possibly talking about the fact that CDF of any continuous rv follows Uniform distribution...

  14. #14
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: transformation problem

    Quote Originally Posted by Sambit View Post
    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

  15. #15
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: transformation problem


    Quote Originally Posted by Dason View Post
    ... 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.[/URL]
    Well, if you put the result that I gave into the upper limit of an integral (using the original pdf and 0 at the lower limit), then one should be able to easily obtain the uniform cdf.

+ Reply to Thread
Page 1 of 2 1 2 LastLast

           




Similar Threads

  1. Help with Log Transformation
    By naturalgut in forum Statistics
    Replies: 14
    Last Post: 07-31-2014, 07:21 AM
  2. Help with a Box-cox transformation
    By Ballack_27 in forum Statistics
    Replies: 4
    Last Post: 02-03-2011, 02:19 PM
  3. transformation \ need your help
    By ghada8888 in forum SPSS
    Replies: 4
    Last Post: 01-16-2010, 05:55 PM
  4. Back transformation from Log transformation
    By yschoi in forum Statistics
    Replies: 0
    Last Post: 08-14-2009, 06:25 AM
  5. need help with transformation
    By volleytron in forum Statistics
    Replies: 3
    Last Post: 01-12-2006, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats