[R] Very basic statistics in R

arun smartpink111 at yahoo.com
Mon May 6 14:02:31 CEST 2013


Hi,
 set.seed(15)
 vec1<- sample(1:15,10,replace=TRUE)
 mean(vec1)
#[1] 10
 sd(vec1)
#[1] 4.346135
 stErr<- sd(vec1)/sqrt(length(vec1))
 stErr
#[1] 1.374369
library(plotrix)
 std.error(vec1)
#[1] 1.374369
A.K.




----- Original Message -----
From: Xavier Prudent <prudentxavier at gmail.com>
To: S Ellison <S.Ellison at lgcgroup.com>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Sent: Monday, May 6, 2013 3:05 AM
Subject: Re: [R] Very basic statistics in R

Dear Jeff,
Thanks for your fast answer,
I could for sure implement the 2-lines code to calculate the uncertainties,
but I am astonished that a widespread statistics package like R does not
include these very basic quantities.
Regards,
Xavier


2013/5/3 S Ellison <S.Ellison at lgcgroup.com>

>
>
> >  - the mean <x>                   -> mean(x)
> >  - the uncertainty on <x>       -> std.error(x) ? Or sd(x)?
> >  - the standard deviation of x  -> ?
> >  - the uncertainty on the standard deviation -> ?
> >
> > Anyone has an idea?
>
> 1. Use R's help system to look up 'standard deviation' and 'mean'
> e.g.:
> ??'standard deviation'
> ??'mean'
>
> For the other two questions, consult your basic stats textbook; the
> answers can be calculated from the two above together with the number of
> observations.
>
> *******************************************************************
> This email and any attachments are confidential. Any use, copying or
> disclosure other than by the intended recipient is unauthorised. If
> you have received this message in error, please notify the sender
> immediately via +44(0)20 8943 7000 or notify postmaster at lgcgroup.com
> and delete this message and any copies from your computer and network.
> LGC Limited. Registered in England 2991879.
> Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK
>



-- 
*---------------------------------------
Xavier Prudent
*
*
Computational biology and evolutionary genomics
*
*
*
*Guest scientist at the Max-Planck-Institut für Physik komplexer Systeme*
*(MPI-PKS)*
*Noethnitzer Str. 38*
*01187 Dresden
*
*
*
*Max Planck-Institute for Molecular Cell Biology and Genetics*
*
(MPI-CBG)
*
*
Pfotenhauerstraße 108
*
*
01307 Dresden
*
*

*
*
Phone: +49 351 210-2621
*
*Mail: prudent [ at ] mpi-cbg.de
**---------------------------------------*

    [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list