STAC33 Assignment 3

You are expected to complete this assignment on your own: that is, you may discuss general ideas with others, but the writeup of the work must be entirely your own. If your assignment is unreasonably similar to that of another student, you can expect to be asked to explain yourself.

If you run into problems on this assignment, it is up to you to figure out what to do. The only exception is if it is impossible for you to complete this assignment, for example a data file cannot be read. (There is a difference between you not knowing how to do something, which you have to figure out, and something being impossible, which you are allowed to contact me about.)

You must hand in a rendered document that shows your code, the output that the code produces, and your answers to the questions. This should be a file with .html on the end of its name. There is no credit for handing in your unrendered document (ending in .qmd), because the grader cannot then see whether the code in it runs properly. After you have handed in your file, you should be able to see (in Attempts) what file you handed in, and you should make a habit of checking that you did indeed hand in what you intended to, and that it displays as you expect.

Hint: render your document frequently, and solve any problems as they come up, rather than trying to do so at the end (when you may be close to the due date). If your document will not successfully render, it is because of an error in your code that you will have to find and fix. The error message will tell you where the problem is, but it is up to you to sort out what the problem is.

include questions here, H1 for question titles, H2 for parts

questions on numsum, dplyr

1 Math achievement

Over seven thousand students did a math achievement test. For each student, their score on the test was recorded, along with a number of other variables, as described below:

  • School: a number identifying the student’s school (thus, a label rather than a meaningful number).
  • Minority: Yes if the student is a member of a minority racial group, No otherwise.
  • Sex: whether the student identifies as Male or Female.
  • SES: Socio-economic status (on some scale).
  • MathAch: score on the math achievement test.

The data are in

(a) (2 points) Read in and display some of the data.

A gimme two points by now:

my_url <- ""
math_achieve <- read_csv(my_url)
Rows: 7185 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): Minority, Sex
dbl (3): School, SES, MathAch

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.