Note Your answers to the questions below should follow the expectations for homework found here. Due date is on the Dates page.
Variable Types
For each question below, identify what type of variable the variable is.
- Height (m) of an oak tree.
- Number of goals scored in a game.
- Area (km2) of the ozone hole.
- Species of bird.
- Satisfaction with customer service (Excellent, Good, Fair, Poor).
pH in Two Rivers
Recall from your Introductory Statistics course how (what format and in what software and saved how) these data need to be entered. This reading and FAQ may be useful.
Burke Center researchers recorded the pH at ten locations in two streams that were close in proximity but in different watersheds with markedly different geologies. They wanted to determine if the mean pH differed between the two streams. Their data are shown in the table below.
Stream A: 8.97 9.12 9.41 8.67 9.94 8.28 7.86 7.51 9.18 7.68 Stream B: 6.67 5.83 6.84 6.86 5.89 7.42 6.56 5.99 5.33 6.69
Load these data into R and answer the following questions. Make sure to show and refer to R code and results as needed.
- How many total measurements were made? [Refer to R output]
- Construct histograms of pH for both streams.
- Construct summary statistics of pH for both streams.
You may find the following general R code useful.
ggplot(data=DFOBJ,mapping=aes(x=QVAR)) +
geom_histogram(binwidth=NUM,boundary=0,color="black",fill="lightgray") +
labs(y="Frequency of INDIVIDUALS",x="QVAR DESCRIPTION") +
scale_y_continuous(expand=expansion(mult=c(0,0.05))) +
theme_NCStats() +
facet_wrap(vars(CVAR))
Summarize(QVAR~CVAR,data=DFOBJ,digits=NUM)