[R] [FORGED] Help in R

Rolf Turner r.turner at auckland.ac.nz
Wed Sep 13 23:16:05 CEST 2017


On 14/09/17 07:50, Jessie Todd wrote:

> I don’t know if my question is answerable, but it is worth a try. I
> have a data set that I am trying to analyze in R for a course and the
> instructions were to get a standard deviation which I already
> computed in R and use that number and change it to a biased standard
> deviation….(I have the two equations and I understand the difference
> between the two and how the unbiased has the degree of freedom…..I
> just do not know how use my standard deviation and transform it in R
> to a biased one.

This list has a no-homework policy, and I would say "ask your lecturer" 
but it seems your lecturer could be a bit out to lunch, so that might be 
bad advice.

Standard deviations estimates are *always* biased!  (That might be a 
slight overstatement but it is essentially correct.)

What may be biased or unbiased are *variance* estimates.  In the 
simplest setting:

    V1 = (1/n) sum_{i=1)^n (x_i - xbar)^2 is biased.

I.e. E(V1) is not equal to sigma^2, the population variance.

    V2 = (1/(n-1)) sum_{i=1)^n (x_i - xbar)^2 is unbiased.

I.e. E(V2) *is* equal to sigma^2.

The var() function in R gives you the unbiased estimate of variance.

It's a piece of cake to obtain the biased estimate of variance from the
unbiased one --- just multiply by appropriate constant.  (Hint:  this 
constant involves n and n-1. :-) )

What your lecturer *probably* wants you to do is form the biased 
estimate of variance and then estimate the standard deviation by taking
the square root of the biased estimate.

To verify whether the foregoing conjecture is true, you'll have to ask 
your lecturer.  Good luck

Note *both* sqrt(V1) and sqrt(V2) are *biased* estimates of sigma (the 
population standard deviation).

HTH

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list