An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110528/1344f06b/attachment.pl>
Three sigma rule
6 messages · Salil Sharma, David Winsemius, PIKAL Petr +2 more
On May 28, 2011, at 2:12 PM, Salil Sharma wrote:
Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way in R with which I can confirm this data to 68-95-99.8 rule or three- sigma rule?
Can you describe this rule? I get the idea that it might be "private language" adopted by the SigxSigma sect.
I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about percentile ranks conforming to 68-95-99.7 rule for this data.
The quantile function is pretty much "standard operating procedure". fivenum will return the values that would appear in a box-and-whiskers plot.
David Winsemius, MD West Hartford, CT
2 days later
Hi r-help-bounces at r-project.org napsal dne 28.05.2011 20:12:33:
"Salil Sharma" <salil31 at gmail.com> Odeslal: r-help-bounces at r-project.org Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way
in
R with which I can confirm this data to 68-95-99.8 rule or three-sigma
rule?
I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about
percentile
ranks conforming to 68-95-99.7 rule for this data.
Not sure what you exactly want but you could look at function quantile. Or you could compute confidence interval for mean by e.g.
mean.int
function (x, p = 0.95)
{
x.na <- na.omit(x)
mu <- mean(x.na)
odch <- sd(x.na)
l <- length(x.na)
alfa <- (1 - p)/2
mu.d <- mu - qt(1 - alfa, l - 1) * odch/sqrt(l)
mu.h <- mu + qt(1 - alfa, l - 1) * odch/sqrt(l)
return(data.frame(mu.d, mu, mu.h))
}
Regards
Petr
Thanks and regards, Salil Sharma [[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.
Folks:
On Tue, May 31, 2011 at 8:48 AM, Petr PIKAL <petr.pikal at precheza.cz> wrote:
Hi r-help-bounces at r-project.org napsal dne 28.05.2011 20:12:33:
"Salil Sharma" <salil31 at gmail.com> Odeslal: r-help-bounces at r-project.org Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way
in
R with which I can confirm this data to 68-95-99.8 rule or three-sigma
rule?
I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about
percentile
ranks conforming to 68-95-99.7 rule for this data.
Not sure what you exactly want but you could look at function quantile.
-- Nor am I, but ...
Or you could compute confidence interval for mean by e.g.
I'm pretty sure that this is NOT what he wants. -- Bert
mean.int
function (x, p = 0.95)
{
? ?x.na <- na.omit(x)
? ?mu <- mean(x.na)
? ?odch <- sd(x.na)
? ?l <- length(x.na)
? ?alfa <- (1 - p)/2
? ?mu.d <- mu - qt(1 - alfa, l - 1) * odch/sqrt(l)
? ?mu.h <- mu + qt(1 - alfa, l - 1) * odch/sqrt(l)
? ?return(data.frame(mu.d, mu, mu.h))
}
Regards
Petr
Thanks and regards, Salil Sharma ? ?[[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. ______________________________________________ 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.
"Men by nature long to get on to the ultimate truths, and will often be impatient with elementary studies or fight shy of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions." -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics
I think you really want a normality test. If that's what you want, you have more options than the three-sigma rule. http://en.wikipedia.org/wiki/Normality_test Tom
On Tue, May 31, 2011 at 12:31 PM, Bert Gunter <gunter.berton at gene.com> wrote:
Folks: On Tue, May 31, 2011 at 8:48 AM, Petr PIKAL <petr.pikal at precheza.cz> wrote:
Hi r-help-bounces at r-project.org napsal dne 28.05.2011 20:12:33:
"Salil Sharma" <salil31 at gmail.com> Odeslal: r-help-bounces at r-project.org Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way
in
R with which I can confirm this data to 68-95-99.8 rule or three-sigma
rule?
I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about
percentile
ranks conforming to 68-95-99.7 rule for this data.
Not sure what you exactly want but you could look at function quantile.
-- Nor am I, but ...
Or you could compute confidence interval for mean by e.g.
I'm pretty sure that this is NOT what he wants. -- Bert
mean.int
function (x, p = 0.95)
{
? ?x.na <- na.omit(x)
? ?mu <- mean(x.na)
? ?odch <- sd(x.na)
? ?l <- length(x.na)
? ?alfa <- (1 - p)/2
? ?mu.d <- mu - qt(1 - alfa, l - 1) * odch/sqrt(l)
? ?mu.h <- mu + qt(1 - alfa, l - 1) * odch/sqrt(l)
? ?return(data.frame(mu.d, mu, mu.h))
}
Regards
Petr
Thanks and regards, Salil Sharma ? ?[[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. ______________________________________________ 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.
-- "Men by nature long to get on to the ultimate truths, and will often be impatient with elementary studies or fight shy of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions." -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics
______________________________________________ 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.
On May 28, 2011, at 5:12 PM, David Winsemius wrote:
On May 28, 2011, at 2:12 PM, Salil Sharma wrote:
Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way in R with which I can confirm this data to 68-95-99.8 rule or three- sigma rule?
Can you describe this rule? I get the idea that it might be "private language" adopted by the SigxSigma sect.
Given the mention of the SixSigma package I can perhaps be forgiven for jumping to the conclusion that it might be "private language" and I still cannot be sure that a corruption of standard statistical theory has not been adopted by the SSers. Looking at Wikipedia I get a different "answer" to the question what is the "three sigma rule" than I do by looking at "The American Statistician". My hierarchy for probity assigns a higher level of confidence to TAS. The Three Sigma Rule Author(s): Friedrich Pukelsheim Source: The American Statistician, Vol. 48, No. 2 (May, 1994), pp. 88-91 Published by: American Statistical Association Stable URL: http://www.jstor.org/stable/2684253 . For a distribution whose density is unimodal (and notice _not_ assuming symmetry): Pr( abs( X-mean(X) ) > 3*sd(X) ) < 4/18 < 0.05 It seemed trivial to test this with a normal distribution, so I illustrate it with a skewed distribution: > X <- rexp(300) > sum( abs( X-mean(X) ) > 3*sd(X) )/300 [1] 0.02
I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about percentile ranks conforming to 68-95-99.7 rule for this data.
Would those percentiles be: > 50 -c(68, 95, 99.7)/2 [1] 16.00 2.50 0.15 > 50 + c(68, 95, 99.7)/2 [1] 84.00 97.50 99.85
The quantile function is pretty much "standard operating procedure". fivenum will return the values that would appear in a box-and- whiskers plot. -- David Winsemius, MD West Hartford, CT
David Winsemius, MD West Hartford, CT