&text
Name
*** help
Please enter your name
# make this an external chunk that can be included in any file options(width = 70) opts_chunk$set(message = F, error = F, warning = F, echo = F, comment = NA, fig.align = 'center', dpi = 100, fig.height = 4.5, fig.width = 8) source('~/Desktop/R_Projects/Code_Snippets/prob.R') require(ggplot2); require(xtable); require(plyr); require(openintro) options(xtable.type = 'html') knit_hooks$set(inline = function(x) { if(is.numeric(x)) { round(x, getOption('digits')) } else { paste(as.character(x), collapse = ', ') } })
--- &text
*** help
Please enter your email
--- &radio
What can we say about the relationship between the correlation r and the slope b of the least-squares line for the same set of data?
*** items
*** solution
The slope of the least squares line is given by $b = r \times s_y/s_x $. Clearly, $b$ can take values outside of $\pm 1$ and can be smaller, larger or equal to the correlation coefficient $r$. The only true statement is that both $b$ and $r$ must bear the same sign.
r 1 + 1
--- &checkbox
The distribution of the amount of money spent by students for textbooks in a semester is approximately normal in shape with a mean of 290 and a standard deviation of 17. According to the standard deviation rule, almost 37.2% of the students spent more than
*** items
*** solution
source('~/Desktop/R_Projects/Code_Snippets/prob.R') gnorm(290, 17, quantile = 1 - 0.372)
--- &checkbox
The distribution of the amount of money spent by students for textbooks in a semester is approximately normal in shape with a mean of 290 and a standard deviation of 17. According to the standard deviation rule, almost 37.2% of the students spent more than
*** items
*** solution
source('~/Desktop/R_Projects/Code_Snippets/prob.R') gnorm(290, 17, quantile = 1 - 0.372)
--- #college &radio
Can a college's acceptance rate be predicted by the Average SAT score of the students in that college? Here are the results from a sample of schools. Consider the problem of predicting Acceptance Rate (Y) from average SAT score (X). What would be the slope of the best fitting line to predict y from x?
|SAT Score (X) | % Accepted (Y)
---------|------------- | ------------- Mean | 1264 | 38 Stdev. | 62 | 13 Correl. | -0.61
*** items
r -0.61^2
r -0.61*13/62
r -0.61*62/13
r -0.61*38/1264
*** solution
The slope of the least squares line is related to the correlation as $b = r \times \frac{s_y}{s_x}$. Plugging in the values from the table, we get $b = -0.61 \times \frac{13}{62}$, which equals r -0.61*13/62
.
--- &radio #correlation1
The correlation between two scores on tests was found to be exactly 1. Which of the following would not be true, regarding the corresponding scatterplot?
*** items
*** solution
A correlation of 1 implies a perfect
linear relationship meaning all points lie along a straigth line. Given that the correlation is positive, the line will slope uphill. However, there is no reason for the slope of the best fitting line to equal 1.
--- &radio
Let us enter the data on tests with:
t1 <- c(75, 85, 78, 82, 65, 85) t2 <- c(90, 95, 87, 92, 94, 95)
Which command will do a two sample t test with an assumption of equal variances:
*** items
t.test(t1, t2)
t.test(t1, t2, var.equal=TRUE)
two.sample.t.test(t1,t2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.