Assignment 1 - Solution
Assignment 1 - Solution
Solution to Assignment 1
2021-2022 Semester 1
1. [6 marks] There 60 students in a class and their grades are given in the following table. Use
Excel to plot a bar chart for the data.
Answer:
Students' Grades
16
14
12
10
8
6
4
2
0
A+ A A- B+ B B- C+ C C- D+ D F
2. [12 marks] Suppose that ABC Company did a survey regarding the quality of its
services. In the survey, a respondent chooses one of the following opinions to the
statement “the service quality of ABC company is one of the best in the market": strongly
agree-5, agree-4, neutral-3, disagree-2, strongly disagree-1. 20 customers responded and
their results are as follows:
a. Is the data in the above table quantitative or qualitative? Is the data nominal, ordinal,
interval or ratio?
b. Construct a class frequency table and a pie chart for the above table.
c. What conclusion can you reach concerning the service quality of ABC company?
Neutral , 20%
Agree , 25%
c. 65% of customers agree or strongly agree that the service quality of ABC company
is the best in the market.
3. [12 marks] Suppose that the following data is about the cost of monthly electricity during
June 2019 for a random sample of 50 one-bedroom apartments in Hong Kong (the unit is
HKD):
960 1710 2020 1500 1470 1020 1530 2270 1270 1830
1570 1620 750 1460 1720 1110 1480 2120 1300 1650
1410 1490 1860 1750 1230 1280 1440 1680 1790 1670
770 1320 950 1960 1420 1330 1290 2050 2450 2650
1500 1420 1380 920 1520 2710 1380 980 1340 1250
3. Answer:
(a) Quantitative, ratio.
(b)
Answer:
a. 𝐧 = 𝟏𝟎𝟎
(𝟑𝟎𝟎𝟎×𝟓+𝟒𝟎𝟎𝟎×𝟏𝟓+𝟓𝟎𝟎𝟎×𝟑𝟓+𝟔𝟎𝟎𝟎×𝟑𝟎+𝟕𝟎𝟎𝟎×𝟏𝟎+𝟖𝟎𝟎𝟎×𝟓)
̅=
Mean: 𝒙 = 𝟓𝟒𝟎𝟎
𝒏
𝐧+𝟏
Median Positioning = = 𝟓𝟎. 𝟓
𝟐
Median: m=(5000+5000)/2=5000
b. Standard deviation:
̅)𝟐 ×𝟓+(𝟒𝟎𝟎𝟎−𝒙
[(𝟑𝟎𝟎𝟎−𝒙 ̅)𝟐 ×𝟏𝟓+(𝟓𝟎𝟎𝟎−𝒙
̅)𝟐 ×𝟑𝟓+(𝟔𝟎𝟎𝟎−𝒙
̅)𝟐 ×𝟑𝟎+(𝟕𝟎𝟎𝟎−𝒙
̅)𝟐 ×𝟏𝟎+(𝟖𝟎𝟎𝟎−𝒙
̅)𝟐 ×𝟓]
𝐬=√
𝒏−𝟏
Note that the above table describes a population rather than a sample.
Answer the following questions:
a. Calculate the mean value and the median value of the population.
b. Calculate the standard deviation of the population.
Answer:
a. N=10
∑𝑵
𝒊=𝟏 𝒙𝒊 𝟏+𝟐+𝟐+𝟑+𝟒+𝟐+𝟑+𝟒+𝟑+𝟓 𝟐𝟗
Mean: 𝛍 = = = 𝟏𝟎 =2.9
𝑵 𝟏𝟎
𝟏𝟎+𝟏
Median Position: = 𝟓. 𝟓
𝟐
Order the data: 1,2,2,2,3,3,3,4,4,5
Median 𝛈=(3+3)/2=3
b. Standard Deviation:
∑𝑵
𝒊=𝟏(𝒙𝒊 −𝝁)
𝟐 (𝟏−𝟐.𝟗)𝟐 +(𝟐−𝟐.𝟗)𝟐 ×𝟑+(𝟑−𝟐.𝟗)𝟐 ×𝟑+(𝟒−𝟐.𝟗)𝟐 ×𝟐+(𝟓−𝟐.𝟗)𝟐
𝛔=√ =√ =1.136
𝑵 𝟏𝟎
6. [12 marks] You are the manager of ABC restaurant. You notice that the consumer’s
waiting time in your restaurant is normally distributed with a mean time of 8 minutes.
a. If 68% of the consumers wait between 6 and 10 minutes, what is the standard deviation?
b. Given (a), what percentage of the waiting time is 4 and 12 minutes?
c. If the service of your restaurant is improved and now 95% of the consumers wait between
3 and 9 minutes, what is the new mean and new standard deviation?
Answer:
(a) Let σ denote the standard deviation. The mean μ = 8. 68% of assemble times are between
[μ − σ, μ + σ] = [6,10]. Thus σ = 2.
(b) [4,12] = [𝜇 − 2𝜎, 𝜇 + 2𝜎]. Thus 95% of the assemble times is 4 and 12 minutes.
7. [10 marks] Tom has applied to two different universities (Universities A and B) for his
postgraduate studies. According to historical records, 20% of applicants (with similar
qualifications as Tom's) who applied to University A received offers, while University B
sent offers to 40% of the applicants (with similar qualifications as Tom's). Assume whether
University A sends an offer to a student is independent of whether University B sends an
offer to the student. Answer the following questions:
a. What is the probability that Tom will receive offers from both universities?
b. What is the probability that Tom will receive at least one offer from the two universities?
Answer:
P(A)=20% and P(B)=40%.
a. 𝐏(𝐀 ∩ 𝐁) = 𝐏(𝐀)𝑷(𝑩) = 𝟖% due to independence
b. P(𝐀 ∪ 𝐁) = 𝐏(𝐀) + 𝐏(𝐁) − 𝐏(𝐀 ∩ 𝐁) = 𝟐𝟎% + 𝟒𝟎% − 𝟖% = 𝟓𝟐%
8. [18 marks] Consider we toss a standard die. Define the following two events: A = {Toss
an odd number} and B = {Toss a number less than or equal to 2}.
a. Calculate the probability of A.
b. Calculate the probability of Ac
c. Are A and B mutually exclusive? Why?
d. Calculate the probability of A ∩ B.
e. Calculate the probability of A∪B.
f. Calculate P(B|A).
g. What is the relation between P(A) and P(A ∩ Bc ) + P(A ∩ B)?
Answer:
a. 𝐴 = {1,3,5}. P(A)=1/2.
b. P(Ac )=1-P(A)=1/2.
c. NO, since 𝐵 = {1,2} and 𝐴 ∩ 𝐵 = {1}.
e. 𝐴 ∩ 𝐵 = {1}. P(𝐴 ∩ 𝐵) = 1/6.
d. A∪B={1,2,3,5}. P(A∪B)=4/6=2/3.
f. P(B|A)=P(𝐴 ∩ 𝐵)/𝑃(𝐴) = 1/3
g. Equal. P(A)=P(A ∩ B c ) + P(A ∩ B).
9. [10 marks] Tom and Mike will play a badminton match, which consists of three games.
In each game, Tom’s chance of winning is 45%. Anyone who wins at least two games
wins the match. What is Tom’s chance of winning the match? If Tom wants to defeat
Mike in a match, should Tom play a match with three games, or a match with only one
game (which one provides higher chance of winning the match)?
Answer:
Let X be the number of games Tom win the match.