Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

STAT 1000 - Worksheet 1

Solutions

2023-01-11

Solutions

Below is a dataset containing the test results from a class of 34 students:

75 51 72 82 46 68 51 53 65 53 65 86 68 57 73 78 70
70 68 54 55 76 99 70 80 60 78 79 81 65 80 64 66 93

1. Store this dataset as a vector called testScores. (Do not worry if the code runs off the page here.)

testScores <- c(75, 51, 72, 82, 46, 68, 51, 53, 65, 53, 65, 86, 68, 57, 73, 78, 70, 70, 68, 54, 55, 76,

2. Calculate the mean of this dataset.

mean(testScores)

## [1] 69.14706

3. Create a histogram of this dataset.

hist(testScores)

1
Histogram of testScores
10
8
Frequency

6
4
2
0

40 50 60 70 80 90 100

testScores

You might also like