Results 1 to 5 of 5

Math Help - Variables with set variance and mean

  1. #1
    Newbie
    Joined
    Apr 2009
    Posts
    3

    Variables with set variance and mean

    I need to test if ratio variables made from uncorrellated/correlated
    variables are correlated. I have three questions:

    1) Should I generate uniformely distributed variables e.g. X=rand
    (50,1) or normally distributed variables by using RANDN?

    2) How can I generate a matrix of 50-by-1 containing numbers with a
    predefined mean and variance?

    3 Is it possible to predetrmine "the correlation level" of the
    variables in the matrix. For example to create a matrix of 50-by-1
    with correlation coeffecient of 0.70 (is this possible also if mean
    and variance are predefinied)?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by BR20 View Post
    I need to test if ratio variables made from uncorrellated/correlated
    variables are correlated. I have three questions:

    1) Should I generate uniformely distributed variables e.g. X=rand
    (50,1) or normally distributed variables by using RANDN?

    2) How can I generate a matrix of 50-by-1 containing numbers with a
    predefined mean and variance?

    3 Is it possible to predetrmine "the correlation level" of the
    variables in the matrix. For example to create a matrix of 50-by-1
    with correlation coeffecient of 0.70 (is this possible also if mean
    and variance are predefinied)?
    In what language?

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2009
    Posts
    3
    I'm using MatLab.

    BR
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by BR20 View Post
    I need to test if ratio variables made from uncorrellated/correlated
    variables are correlated. I have three questions:

    1) Should I generate uniformely distributed variables e.g. X=rand
    (50,1) or normally distributed variables by using RANDN?

    2) How can I generate a matrix of 50-by-1 containing numbers with a
    predefined mean and variance?

    3 Is it possible to predetrmine "the correlation level" of the
    variables in the matrix. For example to create a matrix of 50-by-1
    with correlation coeffecient of 0.70 (is this possible also if mean
    and variance are predefinied)?
    1. Use normals since then it is easier to generate correlated RVs

    2. x=randn(50,1)*sigma+mean

    3. xx=lambda*x+[0;rho*x(1:length(x)-1)] will give correlated RV's but you will have to sort out what lambda and rho have to be to give the required mean and SD and correlation coefficient.

    CB
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Apr 2009
    Posts
    3
    Thanks!

    2) so if i want to create normally distributed variables with mean=20 and variance= 10, the matrix is produced by X=randn(50,1)*20+sqrt(10)

    3) since i'm not a matlab expert, could you please clear the syntax for me. I'd really appreciate it. how would i create a matrix of 50-by-1 where the correlation coeffecient is e.g. 0.7?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Independent Random Variables - Variance of 2 Die
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: November 29th 2010, 10:54 PM
  2. What is the variance of the division of 2 random variables?
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: March 23rd 2010, 01:23 PM
  3. Covariance/variance with two random variables
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: March 2nd 2009, 02:12 PM
  4. Variance of the sum of N independent variables
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: February 24th 2009, 05:28 PM
  5. random variables and variance
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: November 26th 2008, 02:25 AM

Search Tags


/mathhelpforum @mathhelpforum