Skip to content

Need some help reproducing a graph

5 messages · dLevy, David Winsemius, Bert Gunter +1 more

#
<http://r.789695.n4.nabble.com/file/n4645492/graph.jpg> 


I need to replicate this graph. It is a simple normal distribution-curve
with mean 90 and sd=10. The vertical bars is the 95% confidence limit of the
mean. How on earth do I add those confidence limits? 

Im thinking something that has to do with:

c(0.025,0.975)

But I really dont know :S

Any help? 



--
View this message in context: http://r.789695.n4.nabble.com/Need-some-help-reproducing-a-graph-tp4645492.html
Sent from the R help mailing list archive at Nabble.com.
#
On Oct 8, 2012, at 2:43 PM, dLevy wrote:

            
?segments
#
Homework? We don't do homework here.

Bert

Sent from my iPhone -- please excuse typos.
On Oct 8, 2012, at 4:20 PM, dLevy <mansten at hotmail.com> wrote:

            
#
Its not homework, it is a seminar exercise that I need to complete in order
to learn enough in order to take the home exam next month. There are no
lecture slides, just a generic textbook in R for bio statistics. Ive been
trying to solve this problem for almost a week now but I am stuck.



--
View this message in context: http://r.789695.n4.nabble.com/Need-some-help-reproducing-a-graph-tp4645492p4645508.html
Sent from the R help mailing list archive at Nabble.com.
#
Hello,

Try


qq <- qnorm(0.975)
x <- 90 + c(-1, 1)*qq*10

f <- function(x) dnorm(x, 90, 10)
curve(f, from = 60, to = 120)
segments(x, 0, x, f(x))


Hope this helps,

Rui Barradas
Em 09-10-2012 00:48, dLevy escreveu: