Statistics 1

In-Class Exercise 1

Yu-You Liou

Shih Chien University

2026-09-16

Question 1

Addition

Evaluate 1 + 1 in R.

Question 2

Multiplication

Evaluate 3 \times 4 in R.

Question 3

Drawing a Random Sample

A class has 55 students, numbered 1 through 55. Use set.seed(2026) so that your result can be reproduced, draw a random sample of 10 students with sample(), and report the mean of the 10 student numbers with mean().

Question 4

Classifying Variables

For each of the following variables, state whether it is qualitative or quantitative, and give its level of measurement (nominal, ordinal, interval, or ratio).

  1. The blood type of a patient
  2. The number of customers served in a day
  3. The ranking of a restaurant on a five-star scale
  4. The monthly rent of an apartment in New Taipei City