MCQs / Computer Science / Unit 4: Data and Analysis

Unit 4: Data and Analysis MCQs — Computer Science

54 multiple-choice questions on Unit 4: Data and Analysis from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

1. Which chart is best for showing the relationship between two numerical variables, such as height and weight?

  1. Scatter plot
  2. Histogram
  3. Pie chart
  4. Bar chart

Answer: A) Scatter plot

Explanation: Each point is one person (x = height, y = weight); patterns show correlation. SLO CS-11-D-03 · Understanding

Discuss this question

2. A taxi fare is modelled as y = 40x + 100 (rupees, x in km). What is the fare for a 5 km trip?

  1. Rs 240
  2. Rs 300
  3. Rs 145
  4. Rs 500

Answer: B) Rs 300

Explanation: y = 40 5 + 100 = 300. Here the intercept 100 is the fixed starting charge and the slope 40 is the cost per km. SLO CS-11-D-01 · Application

Discuss this question

3. The correlation coefficient r always lies between:

  1. 0 and 100
  2. 0 and 1
  3. -infty and +infty
  4. -1 and +1

Answer: D) -1 and +1

Explanation: r = +1: perfect positive, r = -1: perfect negative, r approx 0: no linear relationship. SLO CS-11-D-01 · Knowledge

Discuss this question

4. Which matplotlib function draws a pie chart?

  1. plt.pie()
  2. plt.circle()
  3. plt.bar()
  4. plt.round()

Answer: A) plt.pie()

Explanation: Others: plt.bar(), plt.scatter(), plt.boxplot(), plt.hist(), plt.plot(). SLO CS-11-D-03 · Knowledge

Discuss this question

5. Which of the following is a statistic?

  1. The average age of 50 randomly selected employees
  2. The average height of all students in a country
  3. The average income of every citizen in a province
  4. The true proportion of all voters supporting a candidate

Answer: A) The average age of 50 randomly selected employees

Explanation: A statistic describes a sample; a parameter describes the whole population. SLO CS-11-D-02 · Knowledge

Discuss this question

6. Deciding whether an e-mail is spam or not spam using labelled examples is:

  1. Unsupervised clustering
  2. Linear regression
  3. Supervised classification
  4. Smoothing

Answer: C) Supervised classification

Explanation: The model learns from e-mails already labelled spam / not spam. SLO CS-11-D-01 · Understanding

Discuss this question

7. Ice-cream sales and drowning cases rise together in summer. The best conclusion is:

  1. Drowning causes ice-cream sales
  2. There is no relationship at all
  3. They are correlated, but this does not prove that one causes the other
  4. Eating ice cream causes drowning

Answer: C) They are correlated, but this does not prove that one causes the other

Explanation: Both are driven by a third factor (hot weather). Correlation ≠ causation — experiments are needed to test cause. SLO CS-11-D-02 · Understanding

Discuss this question

8. What is the main purpose of a histogram?

  1. To display the distribution of a single numerical variable
  2. To list raw data in a table
  3. To show the relationship between two variables
  4. To compare parts of a whole as percentages

Answer: A) To display the distribution of a single numerical variable

Explanation: Histograms show how often values fall into ranges (bins). SLO CS-11-D-03 · Understanding

Discuss this question

9. Which measure describes the spread of data?

  1. Mode
  2. Mean
  3. Median
  4. Standard deviation

Answer: D) Standard deviation

Explanation: Mean, median and mode are measures of central tendency; range, IQR and standard deviation measure spread. SLO CS-11-D-02 · Knowledge

Discuss this question

10. Which chart is most suitable to show how a city's temperature changes over 12 months?

  1. Pie chart
  2. Line graph
  3. Boxplot
  4. Scatter plot with no order

Answer: B) Line graph

Explanation: Line graphs show trends over time. SLO CS-11-D-03 · Understanding

Discuss this question

11. In statistics, a sample is:

  1. The entire population
  2. Only the largest values
  3. A graph of the population
  4. A subset of the population used to draw conclusions about it

Answer: D) A subset of the population used to draw conclusions about it

Explanation: We use a random sample to estimate population parameters. SLO CS-11-D-02 · Knowledge

Discuss this question

12. In the line y = mx + c, what does m represent?

  1. The y-intercept
  2. The slope (rate of change of y for each unit of x)
  3. The value of y when x = 0
  4. The correlation coefficient

Answer: B) The slope (rate of change of y for each unit of x)

Explanation: m is the slope; c is the intercept — the value of y when x = 0. SLO CS-11-D-01 · Knowledge

Discuss this question

13. Grouping customers into similar groups without labels, e.g. with K-means, is:

  1. Supervised learning
  2. Linear regression
  3. Reinforcement learning
  4. Unsupervised learning (clustering)

Answer: D) Unsupervised learning (clustering)

Explanation: Supervised learning needs labelled examples; clustering finds groups on its own. SLO CS-11-D-01 · Understanding

Discuss this question

14. A boxplot directly shows:

  1. Values over time
  2. Percentages of a whole
  3. The mean and mode only
  4. The median, quartiles and possible outliers

Answer: D) The median, quartiles and possible outliers

Explanation: The box spans Q1 to Q3 (the IQR) with a line at the median; whiskers and points show spread and outliers. SLO CS-11-D-03 · Knowledge

Discuss this question

15. A correlation of r = -0.9 between hours of gaming and exam marks means:

  1. A strong negative linear relationship: more gaming tends to go with lower marks
  2. A weak positive relationship
  3. No relationship
  4. Gaming causes higher marks

Answer: A) A strong negative linear relationship: more gaming tends to go with lower marks

Explanation: Strong because r is close to 1, negative because of the sign. It still doesn't prove causation. SLO CS-11-D-01 · Understanding

Discuss this question

16. Monthly salaries in an office are 30k, 32k, 35k, 33k and 900k. Which measure best represents a typical salary?

  1. Range
  2. Maximum
  3. Mean
  4. Median

Answer: D) Median

Explanation: The outlier (900k) pulls the mean up; the median (33k) is not affected by extreme values. SLO CS-11-D-02 · Understanding

Discuss this question

17. Predicting the price of a house from its area (a continuous number) is a task for:

  1. Linear regression
  2. Classification
  3. Clustering
  4. Association

Answer: A) Linear regression

Explanation: Regression predicts numbers; classification predicts categories. SLO CS-11-D-01 · Understanding

Discuss this question

18. A website shows half its visitors a green button and half a blue button, then compares sign-ups. This is:

  1. A randomized experiment (A/B test)
  2. An observational study
  3. A survey
  4. A census

Answer: A) A randomized experiment (A/B test)

Explanation: Random assignment to groups lets the difference be attributed to the button colour. SLO CS-11-D-02 · Understanding

Discuss this question

19. The standard deviation of 2, 4, 4, 4, 5, 5, 7, 9 (population) is:

  1. 4
  2. 5
  3. 32
  4. 2.0

Answer: D) 2.0

Explanation: Variance = 32/8 = 4, SD = √4 = 2. SLO CS-11-D-03

Discuss this question

20. K-means clustering is an example of:

  1. unsupervised learning
  2. supervised learning
  3. encryption
  4. linear regression

Answer: A) unsupervised learning

Explanation: K-means groups unlabelled data. SLO CS-11-D-01

Discuss this question

21. The mode of A, B, A, C, B, A, D is:

  1. B
  2. A
  3. C
  4. D

Answer: B) A

Explanation: A appears three times, more than any other grade. SLO CS-11-D-03

Discuss this question

22. For salaries with a few very high values, the best measure of centre is the:

  1. mode
  2. range
  3. mean
  4. median

Answer: D) median

Explanation: The median is not affected by extreme values. SLO CS-11-D-02

Discuss this question

23. A box plot displays the:

  1. five-number summary (min, Q1, median, Q3, max)
  2. mean and mode only
  3. frequencies of categories
  4. regression line

Answer: A) five-number summary (min, Q1, median, Q3, max)

Explanation: The box covers Q1 to Q3 with the median inside; whiskers show min and max. SLO CS-11-D-03

Discuss this question

24. Ice-cream sales and drowning cases rise together. The best explanation is:

  1. ice-cream causes drowning
  2. drowning causes ice-cream sales
  3. a third variable – hot weather – affects both
  4. the data is wrong

Answer: C) a third variable – hot weather – affects both

Explanation: Hot weather is a confounding variable; correlation is not causation. SLO CS-11-D-02

Discuss this question

25. For y = 4.42x + 47, the predicted y when x = 10 is about:

  1. 51.4
  2. 44.2
  3. 470
  4. 91.2

Answer: D) 91.2

Explanation: y = 4.42 × 10 + 47 = 91.2. SLO CS-11-D-01

Discuss this question

Page 1 of 3 Next

Practise Unit 4: Data and Analysis MCQs

More Computer Science chapters