Homework 2: Introduction to R, Part 2write your name here
Part 1. From the week 2 lecture
Are the following statements True or False?
Please add a brief explanation to support your choice.
QUESTION 1
• Statement: Bias in a test may disadvantage students in a particular cultural group.
• True or False:
• Description:
QUESTION 2
• Statement: Using IQ scores for college admission is a test misuse.
• True or False:
• Description:
Part 2. From the week 2 discussion
QUESTION 1
In an R chunk below,
1. Import the grit data.
2. Find the column that corresponds to the item ““Have you voted in a national election in the past
year?” Store that column into object a.
3. Export the new dataset with the name grit_new.csv.
QUESTION 2
The function fivenum() can be useful to summarize data. Read the documentation on this function. Then
use this function on the column in the grit data corresponding to the respondent’s age. What do you notice
about the results?
1
QUESTION 3
The following code stores a vector of numbers into scores. (scores > 80) is a logical expression, the
results of which is stored in output. Run the following code chunk to see what is contained in output. You
should see a vector of TRUE and FALSE. Explain how this vector was created. Why are certain elements of
the output vector TRUE and why are some FALSE?
scores