Assignment 1
Assignment 1
Rubab Rafique
02-152241-014
Q 1. The following data give the number of people living in each of 50 buildings from a certain
locality
21 50 35 39 48 46 36 54 42 30 29 42 32 40 34 31 45 35 37 52 44 39 43
37 33 51 53 33 46 43 47 41 26 38 52 48 25 34 37 33 36 27 54 36 41 33
23 29 28 44
Create frequency table taking suitable class intervals also mention midpoints and class
boundaries of the intervals.
Solution:
To create a frequency table.
1. Find the range:
• Smallest value = 21
• Largest value = 54
• Range = 54 - 21 = 33
Class width = 5
Solution:
Class width = 10
Lowest class limit = 45
Highest value in the dataset = 118
Frequency Table:
Histogram:
0
45-54 55-64 65-74 75-84 85-94 95-104 105-114 115-124
class Interval
Q 3. The data given below gives the yearly profits of the Companies A & B
Year Profit-A Profit-B
1980 10,000 15,000
1981 8,000 13,000
1982 13,000 14,000
Create multiple bar diagram for the above data.
Bar Diagram:
Year Profit-A Profit-B
1980 10,000 15,000
1981 8,000 13,000
1982 13,000 14,000
Comparison of Profits
1982
1981
1980
Profit-B Profit-A
Q 4. Create a Pie chart for the following data:
Items Expenditure (Rs)
Food 9500
Clothing 3200
House Rent 5000
Medical Care 2300
Utilities 7000
Others 4000
Solution:
Frequency
3
2
11
2
Solution:
Given Data:
123, 116, 122, 110, 175, 120, 125, 111, 118, 117
Mean (Average):
Mean = ∑𝑋/N
where X represents each data point, and N is the number of data points.
Median:
• Arrange the data in ascending order:
110, 111, 116, 117, 118, 120, 122, 123, 125, 175
• Since there are 10 values (even count), the median is the average of the 5th and 6th
values: Median=118+120/2 = 119
= 1237/10 = 123.7
• Mean = 123.7
• Median = 119
b) Answer:
The substantial difference between the mean and median in this dataset is primarily due to the
presence of an outlier.
• The mean is affected by extreme values (like 175), which pulls it higher.
• The median is resistant to extreme values and remains closer to the center of
the dataset.
Q 6. The following frequency table gives the heights (in inches) of 100 students in a college:
Calculate (a) Median (b) Mode (c) Variance (d) Q3 (e) D9 (f) P69
Solution:
a) Median:
N/2 = 100/2 = 50
The 50th Value falls in the 64-66 class because its cumulative frequency is 65.
Formula for Median:
Median = L+(N/2 – CF/ f) x h
Where,
L = lower boundary of median class = 64
N = total frequency = 100
CF = cumulative frequency before median class = 23
f = frequency of median class = 42
h = class width = 2
b) Mode:
The modal class is the class with the highest frequency = 64 - 66 (since 42 is the highest
frequency).
Mode Formula:
Mode = L + ( f1 – f0 / 2f1-f0-f2) x h
where:
• L = 64 (lower boundary of modal class)
• f₁ = 42 (modal class frequency)
• f₀ = 18 (preceding class frequency)
• f₂ = 20 (following class frequency)
• h=2
c)Variance:
Variance=∑f(x - xˉ)2/N
where:
• x = midpoint of each class
• xˉ = mean
• N = total number of students
d)Q3(third Quartile)
e) D9(9th Decile)
f) P69
Solution:
a) Stem-and-Leaf plot:
A stem-and-leaf plot organizes data by separating the first digit (stem) from the last
digit (leaf).
For the given scores, we arrange them in ascending order and group them based on
their tens place.
1|057
2|356
3|246
4|11338
5|22457
6|00123445779
7|012444566788899
8|00011223445589
9|0258
b) Histogram:
Relative Frequency
14
12
10
0
19-10 20-29 30-29 40-49 50-59 60-69 70-79 80-89 90-99
∑(𝑥 − 𝑥)2
∘= √
𝑁