case0701: The Big Bang

case0701R Documentation

The Big Bang

Description

Hubble's initial data on 24 nebulae outside the Milky Way.

Usage

case0701

Format

A data frame with 24 observations on the following 2 variables.

Velocity

recession velocity (in kilometres per second)

Distance

distance from earth (in magaparsec)

Source

Ramsey, F.L. and Schafer, D.W. (2013). The Statistical Sleuth: A Course in Methods of Data Analysis (3rd ed), Cengage Learning.

References

Hubble, E. (1929). A Relation Between Distance and Radial Velocity Among Extragalactic Nebulae, Proceedings of the National Academy of Science 15: 168–173.

See Also

ex0725

Examples

str(case0701) 
attach(case0701)  

## EXPLORATION
plot(Distance ~ Velocity)   
myLm <- lm(Distance ~ Velocity)  
abline(myLm) 

myResiduals <- myLm$res  
myFits  <- myLm$fit  
plot(myResiduals ~ myFits)   # Plot residuals versus estimated means.
abline(h=0)  # Draw a horizontal line at 0.     
# OR, use this shortcut...
plot(myLm, which=1) # Residual plot (red curve is a scatterplot smooother)

## INFERENCE
summary(myLm)  
confint(myLm,level=.95)   
myLm2 <- lm(Distance ~ Velocity - 1)   # Drop the intercept.
summary(myLm2) 
confint(myLm2) 

## DISPLAY FOR PRESENTATION
plot(Distance ~ Velocity, xlab="Recession Velocity (km/sec)", 
  ylab="Distance from Earth (megaparsecs)", 
  main="Measured Distance Versus Velocity for 24 Extra-Galactic Nebulae", 
  pch=21, lwd=2, bg="green", cex=1.5 )  
abline(myLm, lty=2, col="blue", lwd=2) 
abline(myLm2, lty=3, col="red", lwd=2) 
legend(-250,2.05, 
  c("unrestricted regression line","regression through the origin"),  
  lty=c(2,3), lwd=c(2,2), col=c("blue","red")) 

detach(case0701)   

Sleuth3 documentation built on May 29, 2024, 2:56 a.m.