Help in R

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help in R

Jessie Todd
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.
Thanks in advance,
Jessie
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: [FORGED] Help in R

Rolf Turner

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

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Help in R

Rui Barradas
In reply to this post by Jessie Todd
Hello,

Post the two equations, a sample dataset and what you have tried, please.
At the bottom of every mail there's a link to the posting guide where  
you will find instructions on how to ask a good question.

Hope this helps,

Rui Barradas


Citando Jessie Todd <[hidden email]>:

> 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.
> Thanks in advance,
> Jessie
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.