Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

CHD 322 : BIOSTATISTICS AND COMPUTTING II CAT

The CAT assignment should be submitted by 19/3/2023 for marking. It should be hand written.

Q 1.Use the table below-:

Plasma level lies in a range, use midpoint

Plasma level No. Of street


families(f)
15 - 25 30
25- 35 40
35- 45 100
45 - 55 110
55 - 65 80
65 - 75 30
75 - 85 10

Using the above data


Calculate the-:
i. The mean
ii. Median
iii. Mode
iv. The mean deviation
v. Draw a cumulative frequency curve
vi. Calculate the standard deviation
vii. Calculate the variance

Solution

i. The mean:

To calculate the mean, we need to multiply each midpoint by the corresponding frequency, add up

the results, and divide by the total frequency.

Midpoint = (Upper limit + Lower limit)/2

Mean = Σ(midpoint × f) / Σf = ((20 × 30) + (30 × 40) + (40 × 100) + (50 × 110) + (60 × 80) + (70 × 30) +

(80 × 10)) / (30 + 40 + 100 + 110 + 80 + 30 + 10) = 47.78

Therefore, the mean is 47.78.


ii. The median:

To find the median, we need to arrange the data in ascending order and find the middle value.

Class interval Frequency Cumulative Frequency 15-25 30 30 25-35 40 70 35-45 100 170 45-55 110

280 55-65 80 360 65-75 30 390 75-85 10 400

Median class = 45-55 Median position = (n/2)th term = (400/2)th term = 200th term Median = l +

(h/f) × (m-cumulative frequency of the class previous to the median class) = 45 + (10/110) × (200-

170) = 45 + 0.91 = 45.91

Therefore, the median is 45.91.

iii. The mode:

The mode is the value that occurs most frequently. Here, we can see that the plasma level 45-55 has

the highest frequency (110). Therefore, the mode is 45-55.

iv. The mean deviation:

To calculate the mean deviation, we need to find the deviation of each midpoint from the mean,

multiply each deviation by the corresponding frequency, add up the results, and divide by the total

frequency.

Mean deviation = Σ|midpoint - mean| × f / Σf = ((|20 - 47.78| × 30) + (|30 - 47.78| × 40) + (|40 -

47.78| × 100) + (|50 - 47.78| × 110) + (|60 - 47.78| × 80) + (|70 - 47.78| × 30) + (|80 - 47.78| × 10)) /

(30 + 40 + 100 + 110 + 80 + 30 + 10) = 13.82

Therefore, the mean deviation is 13.82.

V cumulative frequency curve

Using the table below, you can draw a cumulative frequency curve on graph paper by plotting
the values of midpoint and cumulative frequencies.

The midpoint lies on the X-axis while the cumulative frequency lies on the y a-xis

Plasma level No. Of street Midpoint Cumulative


families(f) frequency
15 - 25 30 20 30
25- 35 40 30 70
35- 45 100 40 170
45 - 55 110 50 280
55 - 65 80 60 360
65 - 75 30 70 390
75 - 85 10 80 400

vi. Standard deviation

σ =  
Plasma level No. Of street families(f) Midpoint, x x-47.78 (x-47.78)2
15 - 25 30 20 -27.78 771.7284
25- 35 40 30 -17.78 316.1284
35- 45 100 40 -7.78 60.5284
45 - 55 110 50 2.22 4.9284
55 - 65 80 60 12.22 149.3284
65 - 75 30 70 22.22 493.7284
75 - 85 10 80 32.22 1038.128
Σ(x-47.78)2 2834.499


σ = 2834.499
400

= 2.662
vii. Variance

Variance = 2.6622

= 7.086

Q2. Suppose the following information was collected about a sample of students from
GLUK..

First Secon Third Fourth Total


years d years years years
Non- resident 200 500 700 1100 2500
Resident 1800 1400 900 400 4500
Total 2000 1900 1600 1500 7000

Suppose that a student is randomly selected-:


I. What is the probability that a student is a non- resident?
II. The probability that the student is a resident?
III. The probability that student is a first year?
IV. The probability that that the student is not a first year?
V. The probability the student is a fourth or a third year? Use the addition rule for
mutually exclusive events.
VI. The probability the student is a non- resident first year?
VII. The probability the student is a first year given that he or she commutes? Note in this
problem you are asked to find a conditional probability and that the denominator is
different
VIII. The student is a freshman/ woman or a commuter? Use a Venn diagram to solve for
this or use the Addition rule for events that are not mutually exclusive:
Solution

I. The probability that a student is a non-resident is:


P(Non-resident) = (number of non-resident students) / (total number of students) = 2500 /
7000 = 0.3571
Therefore, the probability that a student is a non-resident is 0.3571 or 35.71%.

II. The probability that the student is a resident is:


P(Resident) = (number of resident students) / (total number of students) = 4500 / 7000 =
0.6429
Therefore, the probability that a student is a resident is 0.6429 or 64.29%.

III. The probability that the student is a first year is:


P(First year) = (number of first year students) / (total number of students) = 2000 / 7000 =
0.2857
Therefore, the probability that a student is a first year is 0.2857 or 28.57%.

IV. The probability that the student is not a first year is:
P(Not first year) = 1 - P(First year) = 1 - 0.2857 = 0.7143
Therefore, the probability that a student is not a first year is 0.7143 or 71.43%.

V. The probability that the student is a fourth or a third year is:


P(Fourth or Third year) = P(Fourth year) + P(Third year) (since the events are mutually
exclusive) = (number of fourth year students) / (total number of students) + (number of third
year students) / (total number of students) = 1500 / 7000 + 1600 / 7000 = 0.3643
Therefore, the probability that a student is a fourth or a third year is 0.3643 or 36.43%.

VI. The probability that the student is a non-resident first year is:
P(Non-resident and First year) = (number of non-resident first year students) / (total number
of students) = 200 / 7000 = 0.0286
Therefore, the probability that a student is a non-resident first year is 0.0286 or 2.86%.

VII.
The probability that a student is a first-year given that he or she commutes can be calculated
using Bayes' theorem, which states that the conditional probability of A given B is equal to
the probability of B given A times the probability of A, divided by the probability of B. In
this case, let A be the event that the student is a first-year, and let B be the event that the
student commutes. Then we have:

We can calculate each of these probabilities as follows:


P(commutes | first-year) is the probability that a first-year student commutes, which can be
obtained by dividing the number of commuting first-year students by the total number of
first-year students:
P(commutes | first-year) = 0.2 or 20%
P(first-year) is the probability that a student is a first-year, which we calculated in part III:
P(first-year) = 0.2857
P(commutes) is the probability that a student commutes, which can be calculated by adding
up the number of commuting students in each year and dividing by the total number of
students:
P(commutes) = (200 + 500 + 700 + 1100) / 7000 = 0.5 or 50%

VII
To find the probability that a student is a freshman/woman or a commuter, we can use the
addition rule for events that are not mutually exclusive, which states that the probability of
either of two events occurring is the sum of their individual probabilities minus the
probability of their intersection (i.e., the probability that both events occur at the same time).
Let A be the event that the student is a freshman/woman, and let B be the event that the
student commutes. Then we have:

We can use the information given in the table to calculate each of these probabilities:
P(A) is the probability that a student is a freshman/woman, which is not given in the table.
P(B) is the probability that a student commutes, which we calculated in part VII:
P(B) = 0.5 or 50%
P(A and B) is the probability that a student is both a freshman/woman and a commuter. Since
we don't have enough information to calculate this directly, we need to use the fact that:
P(A and B) = P(B | A) * P(A)
In other words, the probability that a student is both a freshman/woman and a commuter is
equal to the probability that a commuter is a freshman/woman times the probability that any
given student is a freshman/woman. We don't have the first probability, but we can assume
that it is not 0 (i.e., commuting students are not a disjoint set from freshman/women), and use
the fact that:

In other words, the probability that a student is both a freshman/woman and a commuter
cannot be greater than the smaller of the two individual probabilities. Therefore, we can
assume that:

Putting it all together, we have:

This means that the probability that a student is either a freshman/woman or a commuter is at
least 0, but we cannot say anything more without knowing the value of P(A).

Q3.a) The number of fatalities in motor accidents in one week are as follows-:
Day Number of fatalities
(X)

Sunday 4
Monday 6
Tuesday 2
Wednesday 0
Thursday 3
Friday 5
Saturday 8
Total 28

        Calculate standard deviation using this formula σ =  


4+ 6+2+0+3+ 5+8
Mean = 7
¿4
Number of fatalities x-4 (x-4)2
(X)

4 0 0
6 2 4
2 -2 4
0 -4 16
3 -1 1
5 1 1
8 4 16
42

σ = 42
√ 7

¿6

b). Calculate the standard deviation life of a batch of electric light bulbs following the
following columns in the table below.
Life in hundreds No. of bulbs Mid-point fx f(x-24.375)2
of hrs f x
0-5 4 2.5 10 1914.063
5-10 9 7.5 67.5 2562.891
10- 20 38 15 570 3339.844
20 - 40 33 30 990 1044.141
40 & over 16 50 800 10506.25
Total Σf =100 Σfx=
2437.5
Sum = 19367.19

Use the formula below:


Mean of x = 2437.5/100
=24.375

Standard deviation , σ =
√ 19367.1 9
10 0

= 13.92
Lecturer: L.Kirika

You might also like