Hello, 
  
What I really want to do is to add a rejection region in the 
form of a long rectangle to a density plot I have drawn. 
I am getting  2 plots.  

How can I add rectangle to first plot?  see code below. 
First section works fine.  It just is not quite what I want. 

# NORMAL DISTRIBUTION PLOT OF RAW DATA WITH UPPER CRITICAL LEVEL - ok 
xcrit=144.1 
# *** single-sample Upper one-tailed hypothesis Test, z statistic *** 
cord.x <- c(xcrit,seq(xcrit,200,0.01),200) 
cord.y <- c(0,dnorm(seq(xcrit,200,0.01),140,15),0) 
curve(dnorm(x,140,15),xlim=c(80,200),main='Normal PDF',ylab="Probability") 
polygon(cord.x,cord.y,col='orange') 

# NORMAL DISTRIBUTION PLOT OF RAW DATA WITH UPPER CRITICAL LEVEL - 2 plots? 
xcrit=144.1 
# *** single-sample Upper one-tailed hypothesis Test, z statistic *** 
curve(dnorm(x,140,15),xlim=c(80,200),main='Normal PDF',ylab="Probability") 
plot(c(144.1, 200), c(0, .03), type= "n") 

Thanks. 
Mary A. Marion 

______________________________________________
R-help@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.

Reply via email to