Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos #512

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Exploratory_Data_Analysis/GGPlot2_Part1/lesson
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
Hint: Type myhigh at the command prompt.

- Class: text
Output: Comparing the values of myhigh with the plot, we see the first entries in the vector (29, 29, 31, 30,...) correspond to the leftmost points in the the plot (in order), and the last entries in myhigh (28, 29, 26, 26, 26) correspond to the rightmost plotted points. So, specifying the y parameter only, without an x argument, plots the values of the y argument in the order in which they occur in the data.
Output: Comparing the values of myhigh with the plot, we see the first entries in the vector (29, 29, 31, 30,...) correspond to the leftmost points in the plot (in order), and the last entries in myhigh (28, 29, 26, 26, 26) correspond to the rightmost plotted points. So, specifying the y parameter only, without an x argument, plots the values of the y argument in the order in which they occur in the data.

- Class: cmd_question
Output: The all-purpose qplot can also create box and whisker plots. Call qplot now with 4 arguments. First specify the variable by which you'll split the data, in this case drv, then specify the variable which you want to examine, in this case hwy. The third argument is data (set equal to mpg), and the fourth, the geom, set equal to the string "boxplot"
Expand Down
2 changes: 1 addition & 1 deletion R_Programming/Functions/scripts/telegram-correct.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# }
#
# The simon_says function works just like the paste function, except the
# begining of every string is prepended by the string "Simon says:"
# beginning of every string is prepended by the string "Simon says:"
#
# Telegrams used to be peppered with the words START and STOP in order to
# demarcate the beginning and end of sentences. Write a function below called
Expand Down
2 changes: 1 addition & 1 deletion R_Programming/Functions/scripts/telegram.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# }
#
# The simon_says function works just like the paste function, except the
# begining of every string is prepended by the string "Simon says:"
# beginning of every string is prepended by the string "Simon says:"
#
# Telegrams used to be peppered with the words START and STOP in order to
# demarcate the beginning and end of sentences. Write a function below called
Expand Down
2 changes: 1 addition & 1 deletion R_Programming_Alt/Functions/scripts/telegram-correct.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# }
#
# The simon_says function works just like the paste function, except the
# begining of every string is prepended by the string "Simon says:"
# beginning of every string is prepended by the string "Simon says:"
#
# Telegrams used to be peppered with the words START and STOP in order to
# demarcate the beginning and end of sentences. Write a function below called
Expand Down
2 changes: 1 addition & 1 deletion R_Programming_Alt/Functions/scripts/telegram.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# }
#
# The simon_says function works just like the paste function, except the
# begining of every string is prepended by the string "Simon says:"
# beginning of every string is prepended by the string "Simon says:"
#
# Telegrams used to be peppered with the words START and STOP in order to
# demarcate the beginning and end of sentences. Write a function below called
Expand Down
2 changes: 1 addition & 1 deletion R_Programming_Alt/Looking_at_Data/lesson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
Hint: head(plants) will show you the very top of the dataset.

- Class: text
Output: Take a minute to look through and understand the the output above. Each row is labeled with the observation number and each column with the variable name. Your screen is probably not wide enough to view all 10 columns side-by-side, in which case R displays as many columns as it can on each line before continuing on the next.
Output: Take a minute to look through and understand the output above. Each row is labeled with the observation number and each column with the variable name. Your screen is probably not wide enough to view all 10 columns side-by-side, in which case R displays as many columns as it can on each line before continuing on the next.

- Class: cmd_question
Output: By default, head() shows you the first six rows of the data. You can alter this behavior by passing as a second argument the number of rows you'd like to view. Use head() to preview the first 10 rows of plants.
Expand Down
2 changes: 1 addition & 1 deletion Regression_Models/Count_Outcomes/lesson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Output: "Visits to a web site tend to occur independently, one at a time, at a certain average rate. The Poisson distribution describes random processes of this type. A Poisson process is characterized by a single parameter, the expected rate of occurrence, which is usually called lambda. In our case, lambda will be expected visits per day. Of course, as the web site becomes more popular, lambda will grow. In other words, our lambda will depend on time. We will use Poisson regression to model this dependence."

- Class: cmd_question
Output: "Somwhat remarkably, the variance of a Poisson process has the same value as its mean, lambda. You can quickly illustrate this by generating, say, n=1000 samples from a Poisson process using R's rpois(n, lambda) and calculating the sample variance. For example, type var(rpois(1000, 50)). The sample variance won't be exactly equal to the theoretical value, of course, but it will be fairly close."
Output: "Somewhat remarkably, the variance of a Poisson process has the same value as its mean, lambda. You can quickly illustrate this by generating, say, n=1000 samples from a Poisson process using R's rpois(n, lambda) and calculating the sample variance. For example, type var(rpois(1000, 50)). The sample variance won't be exactly equal to the theoretical value, of course, but it will be fairly close."
CorrectAnswer: 'var(rpois(1000, 50))'
AnswerTests: expr_uses_func('var');expr_uses_func('rpois')
Hint: Try typing var(rpois(1000, 50)).
Expand Down
2 changes: 1 addition & 1 deletion Regression_Models/Overfitting_and_Underfitting/lesson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Hint: "Enter deviance(fit3) at the R prompt."

- Class: cmd_question
Output: "In the next several steps, we will show how to calculate the F value, 20.968, which appears in the table printed by anova(). We'll begin with the denominator, which is fit3's residual sum of squares divided by its degrees of freedom. Fit3 has 43 residual degrees of freedom. This figure is obtained by subtracting 4, the the number of fit3's predictors (the 3 named and the intercept,) from 47, the number of samples in swiss. Store the value of deviance(fit3)/43 in a variable named d."
Output: "In the next several steps, we will show how to calculate the F value, 20.968, which appears in the table printed by anova(). We'll begin with the denominator, which is fit3's residual sum of squares divided by its degrees of freedom. Fit3 has 43 residual degrees of freedom. This figure is obtained by subtracting 4, the number of fit3's predictors (the 3 named and the intercept,) from 47, the number of samples in swiss. Store the value of deviance(fit3)/43 in a variable named d."
CorrectAnswer: d <- deviance(fit3)/43
AnswerTests: "ANY_of_exprs('d <- deviance(fit3)/43', 'd <- deviance(fit3)/df.residual(fit3)', 'd <- deviance(fit3)/fit3$df.residual')"
Hint: "Enter d <- deviance(fit3)/43 at the R prompt."
Expand Down
2 changes: 1 addition & 1 deletion Statistical_Inference/T_Confidence_Intervals/lesson
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
Output: The quantiles are much closer together with the higher degrees of freedom. At the 97.5 percentile, though, the t quantile is still greater than the normal. Student's Rules!

- Class: text
Output: This means the the t interval is always wider than the normal. This is because estimating the standard deviation introduces more uncertainty so a wider interval results.
Output: This means the t interval is always wider than the normal. This is because estimating the standard deviation introduces more uncertainty so a wider interval results.

- Class: text
Output: So the t-interval is defined as X' +/- t_(n-1)*s/sqrt(n) where t_(n-1) is the relevant quantile. The t interval assumes that the data are iid normal, though it is robust to this assumption and works well whenever the distribution of the data is roughly symmetric and mound shaped.
Expand Down