lecture01 notes

Probability and Statistics for Engineering and the Sciences (with CD-ROM and InfoTrac )

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 312: Lecture 01 R Basics Moo K. Chung mchung@stat.wisc.edu September 2, 2004 Histogram of a a Frequency 0 10 20 30 40 50 60 70 0 5 10 15 20 25 30 35 Figure 1: Histogram for binge drinker data 1. Data loading. Let’s illustrate basic R commands by following example 1.5 about binge drinking in college. Data is the percentage of binge drinkers on 140 campuses across the United States. > library(Devore6) > data(xmp01.05) >attach(xmp01.05) > xmp01.05 bingePct 1 4 2 11 3 13 . . . . 138 67 139 67 140 68 2. Histogram. Let’s see some basic R commands. > a<-bingePct > mean(a) [1] 42.33571 > var(a) [1] 205.8361 > sd(a) [1] 14.34699 > hist(a) To find out more about hist command, use > help(hist) . It will display a new window with detailed information about hist . 3. Binge drinking percentage can be modeled sta- tistically. Let
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: X i is the binge drinking percent-age at i-th campus which is distributed normally with mean 40 and standard deviation of 14 , i.e. X i N (40 , 14 2 ) . Since binge drinking percent-ages in different campuses should be indepen-dent, X i s should be assumed to be independent random variables. 4. X 1 , ,X n form a random sample if X i are independent and identically distributed random variables. A statistic is a random variable. Hence sample mean X = n i =1 X i /n is a statistic. It will be distributed as X N (40 / 140 , 14 2 / 140) . Note. Read section 5.4, 5.5 and do Ex.5.48. 5.52. 5.63. Lecture 2-4 will be based on sections 6.1-6.2....
View Full Document

This note was uploaded on 01/31/2008 for the course STAT 312 taught by Professor Chung during the Fall '04 term at Wisconsin.

Ask a homework question - tutors are online