SContinuous1DIII-2-2 - breaks can be set to a sequence, a...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Wednesday February 2, 2011 Last time: Continuous 1-D (Boxplots, Box-Percentile Plots) Today: Continuous 1-D, Part III Next Time: Lab 3: Continuous 1-Dim Announcements: HW 3 due now; HW 4 out tonight Review Summary Conditional Distributions: counts<-table(mfr,shelf); counts2<-table(shelf,mfr) barplot(counts,beside=T); barplot(counts2,beside=T) Rebecca Nugent, Department of Statistics, Carnegie Mellon University, 2011 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Histogram: a bar chart for continuous data (an area plot) the data are binned (“categorized”); each observation goes into only one bin; data are completely partitioned; each bin gets a bar; the height of the bar represents the number of observations in the bin. In R: hist( ) x<-c(runif(50,-1,1),runif(50,1.1,1.15),runif(100,1.3,3.3)) hist(x,breaks=seq(-1,3.5,length=11),col=4,main="Histogram of Uniform Data: 10 Bins") Two displays: Default in R: counts/frequency; prob=T if want area to sum to 1 What information do we get from the graph? Choosing the Bin Width: smoothing parameter of the graph Default in R: Sturges function;
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: breaks can be set to a sequence, a number, or another function Rebecca Nugent, Department of Statistics, Carnegie Mellon University, 2011 2 Average Shifted Histogram: a smoothed histogram (D. Scott, Rice) The accuracy of a histogram depends largely on the choice of bins. Histogram is piecewise constant ; same level across the entire bin. What happens if we shift the bins a little? Might get diFerent levels for exact same location. Each smaller bin has three levels depending on a small shift in the bin. So which one is right? How do you choose where the bins go? Given a starting histogram, f 1 , with bin width h , we create m-1 more histograms by shifting our starting place h m every time ( f 2 , f 3 , ..., f m ). Every smaller bin of size h m has m diFerent levels. We take the average. In R : need to source ashcode.R ; use function ashcode1D(x, m, nbins) Rebecca Nugent, Department of Statistics, Carnegie Mellon University, 2011 3...
View Full Document

This note was uploaded on 04/15/2011 for the course STATISTICS 315 taught by Professor Gnt during the Spring '11 term at Carnegie Mellon.

Page1 / 3

SContinuous1DIII-2-2 - breaks can be set to a sequence, a...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online