Results 1 to 1 of 1

Math Help - Please help on R programming

  1. #1
    Junior Member
    Joined
    Mar 2008
    Posts
    33

    Please help on R programming

    I wrote the following R code

    #Assignment 1 Q3
    s=5
    n=10

    mstore=matrix(nrow=s,ncol=2)
    for(i in 1:s)
    {
    x=rnorm(n)
    mstore[i,1]=mean(x)
    mstore[i,2]=median(x)

    mx = colMeans(mstore)
    }
    print(mx)

    you can see I stored some value in matrix, but how to find the variance of stored mean and median in the matrix?
    Please help me, I'm new to R.
    Last edited by kleenex; August 16th 2008 at 04:39 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Linear Programming Help
    Posted in the Business Math Forum
    Replies: 1
    Last Post: February 20th 2010, 01:28 AM
  2. Programming For HP 48G+
    Posted in the Calculators Forum
    Replies: 0
    Last Post: February 3rd 2009, 04:09 AM
  3. Replies: 1
    Last Post: November 17th 2008, 04:18 AM
  4. Linear Programming...
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: July 16th 2008, 03:31 PM
  5. Linear Programming
    Posted in the Advanced Applied Math Forum
    Replies: 6
    Last Post: July 15th 2008, 04:57 AM

Search Tags


/mathhelpforum @mathhelpforum