Blog
Probability & Statistics Past Paper 2015 – BSCS 3rd Term UOS (MTH-250)
University of Sargodha BS Computer Science 3rd term Probability & Statistics (MTH-250) paper, 2015 exam (80 marks, 2:30 hours). Both scanned pages are retyped below with all tables, followed by solved answers: 16 short definitions and fully worked numericals – grouped mean and median, standard deviation, probability of cables and missiles, sampling distribution of difference of means, pooled confidence interval, t-test, chi-square test of independence, simple and multiple regression. All figures were checked by computer.
Solved answers
Q1 – Short answers (16 × 2)
i. Statistics. Statistics is the science of collecting, organizing, presenting, analysing and interpreting numerical data to draw conclusions and make decisions under uncertainty. (In plural sense, statistics are numerical facts.)
ii. Constant vs variable. A constant has a fixed value that does not change (e.g. π = 3.1416, number of days in a week). A variable is a characteristic that takes different values for different individuals or times (e.g. height, marks, income).
iii. Qualitative vs quantitative data. Qualitative (categorical) data describe attributes that cannot be measured numerically – gender, colour, religion. Quantitative data are numerical measurements or counts – age, weight, number of students (discrete or continuous).
iv. Stem-and-leaf plot. A display that splits each value into a stem (leading digit(s)) and a leaf (last digit), e.g. 45, 47, 52 → 4 | 5 7, 5 | 2. It shows the shape of the distribution while keeping the original data.
v. Arithmetic mean. The sum of all observations divided by their number: x̄ = Σx / n (for grouped data x̄ = Σfx / Σf).
vi. Median with example. The middle value of data arranged in order; it divides the data into two equal halves. For 3, 7, 9, 12, 15 the median is 9; for 2, 4, 6, 8 it is (4 + 6)/2 = 5.
vii. Dispersion. The degree of spread or scatter of observations about an average. Measures: range, quartile deviation, mean deviation, variance and standard deviation (and relative measures like coefficient of variation).
viii. Moments. The r-th moment about the mean is mr = Σ(x − x̄)r / n. m1 = 0, m2 = variance, m3 measures skewness and m4 kurtosis. Moments can also be taken about an arbitrary origin or about zero.
ix. Permutation. An arrangement of objects in a definite order. The number of permutations of n objects taken r at a time is ⁿPr = n!/(n − r)!; e.g. ³P2 = 6.
x. Probability. A numerical measure (0 to 1) of the chance that an event occurs. Classical definition: P(A) = m/n = favourable outcomes / total equally likely outcomes.
xi. Sure event. An event that is certain to occur – it contains the whole sample space; P(S) = 1. E.g. getting a number less than 7 on a die.
xii. Multiplication law for independent events. If A and B are independent, P(A ∩ B) = P(A)·P(B). E.g. P(head and six) = ½ × ⅙ = 1/12.
xiii. Parameters of binomial distribution. n (number of independent trials) and p (probability of success in each trial); q = 1 − p. Mean = np, variance = npq.
xiv. Regression. A statistical technique for estimating the average relationship between a dependent variable Y and one or more independent variables X, used for prediction: Ŷ = a + bX.
xv. Null vs alternative hypothesis. The null hypothesis H0 is the statement of no difference/no effect that is tested (e.g. μ = 50). The alternative hypothesis H1 is the statement accepted if H0 is rejected (μ ≠ 50, μ > 50 or μ < 50).
xvi. Test statistic. A statistic computed from sample data whose sampling distribution is known under H0 (Z, t, χ², F); its value is compared with the critical value to accept or reject H0.
Q2 (a) – Mean length of service
| Years (x) | Companies (f) | fx |
|---|---|---|
| 15 | 8 | 120 |
| 20 | 5 | 100 |
| 25 | 4 | 100 |
| 30 | 1 | 30 |
| Total | 18 | 350 |
x̄ = Σfx / Σf = 350 / 18 = 19.44 years
Q2 (b) – Mean and median of grouped data
| Class | Class boundaries | f | x (mid) | fx | c.f. |
|---|---|---|---|---|---|
| 111-115 | 110.5-115.5 | 1 | 113 | 113 | 1 |
| 116-120 | 115.5-120.5 | 2 | 118 | 236 | 3 |
| 121-125 | 120.5-125.5 | 4 | 123 | 492 | 7 |
| 126-130 | 125.5-130.5 | 11 | 128 | 1408 | 18 |
| 131-135 | 130.5-135.5 | 9 | 133 | 1197 | 27 |
| 136-140 | 135.5-140.5 | 14 | 138 | 1932 | 41 |
| 141-145 | 140.5-145.5 | 7 | 143 | 1001 | 48 |
| 146-150 | 145.5-150.5 | 6 | 148 | 888 | 54 |
| 151-155 | 150.5-155.5 | 3 | 153 | 459 | 57 |
| 156-160 | 155.5-160.5 | 1 | 158 | 158 | 58 |
| Total | 58 | 7884 |
Mean = Σfx / Σf = 7884 / 58 = 135.93
Median: n/2 = 29; the first c.f. ≥ 29 is 41, so the median class is 136-140 (boundaries 135.5-140.5), with l = 135.5, h = 5, f = 14, C = 27.
Median = l + (h/f)(n/2 − C) = 135.5 + (5/14)(29 − 27) = 135.5 + 0.714 = 136.21
Q3 (a) – Standard deviation of internet hours
Using mid-points x and step deviation u = (x − 32)/5:
| Hours | x | f | u | fu | fu² |
|---|---|---|---|---|---|
| 10-14 | 12 | 2 | -4 | -8 | 32 |
| 15-19 | 17 | 12 | -3 | -36 | 108 |
| 20-24 | 22 | 23 | -2 | -46 | 92 |
| 25-29 | 27 | 60 | -1 | -60 | 60 |
| 30-34 | 32 | 77 | 0 | 0 | 0 |
| 35-39 | 37 | 38 | 1 | 38 | 38 |
| 40-44 | 42 | 8 | 2 | 16 | 32 |
| Total | 220 | -96 | 362 |
Mean = 32 + 5(−96/220) = 32 − 2.18 = 29.82 hours
S.D. = h·√[Σfu²/n − (Σfu/n)²] = 5√[362/220 − (−96/220)²] = 5√(1.6455 − 0.1904) = 5√1.4551 = 5 × 1.2063 = 6.03 hours
(If the sample formula with n − 1 is used, s = 6.05 hours.)
Q3 – Cable lengths
Let L = “too large” (> 2010 mm) and S = “too small” (< 1990 mm). P(meets specifications) = 0.99, so P(L) + P(S) = 0.01, and P(L) = P(S).
i) P(too large) = 0.01/2 = 0.005
ii) P(length > 1990) = 1 − P(S) = 1 − 0.005 = 0.995 (it is either within specification or too large: 0.99 + 0.005).
Q3 (b) – Missiles
Lot: 10 missiles, 3 defective, 7 good; 4 chosen. Total ways = ¹⁰C₄ = 210.
i) All 4 fire (all good): P = ⁷C₄ / ¹⁰C₄ = 35/210 = 1/6 ≈ 0.1667
ii) At most 2 will not fire = 1 − P(3 will not fire): P(3 defective) = ³C₃·⁷C₁ / 210 = 7/210 = 1/30, so P = 1 − 1/30 = 29/30 ≈ 0.9667
Q4 (a) – Difference of two sample means
μA − μB = 6.5 − 6.0 = 0.5; σx̄A − x̄B = √(0.81/36 + 0.64/49) = √(0.0225 + 0.01306) = √0.03556 = 0.1886
P(x̄A − x̄B ≥ 1) = P(Z ≥ (1 − 0.5)/0.1886) = P(Z ≥ 2.65) = 1 − 0.9960 = 0.0040
Q4 (b) – 95% CI for μ₂ − μ₁ (pooled variance)
sp² = [(13)(1.5) + (15)(1.8)] / 28 = (19.5 + 27)/28 = 1.6607, sp = 1.2887
d.f. = 14 + 16 − 2 = 28, t0.025,28 = 2.048
(x̄₂ − x̄₁) ± t·sp√(1/n₁ + 1/n₂) = 2 ± 2.048 × 1.2887 × √(1/14 + 1/16) = 2 ± 2.048 × 1.2887 × 0.3660 = 2 ± 0.966
1.03 < μ₂ − μ₁ < 2.97 days – medication 1 gives a faster recovery by about 1 to 3 days.
Q5 (a) – Is the serum effective? (pooled t-test)
Treatment: n₁ = 5, x̄₁ = 14.3/5 = 2.86, s₁² = 3.883. No treatment: n₂ = 4, x̄₂ = 8.3/4 = 2.075, s₂² = 1.3625.
- H0: μ₁ = μ₂ (serum not effective); H1: μ₁ > μ₂ (treated mice survive longer). α = 0.05, one-tailed.
- sp² = [4(3.883) + 3(1.3625)]/7 = 2.8028, sp = 1.674
- t = (2.86 − 2.075) / [1.674√(1/5 + 1/4)] = 0.785 / 1.123 = 0.70
- Critical value: t0.05,7 = 1.895. Since 0.70 < 1.895, H0 is not rejected.
Conclusion: At the 0.05 level there is no evidence that the serum is effective (p ≈ 0.25).
Q5 (b) – χ² test of independence
H0: hypertension is independent of smoking habits; H1: they are dependent. Totals: rows 87 and 93, columns 69, 62, 49, n = 180. Expected E = (row total × column total)/180:
| Non-smokers | Moderate | Heavy | |
|---|---|---|---|
| Hypertension (O / E) | 21 / 33.35 | 36 / 29.97 | 30 / 23.68 |
| No hypertension (O / E) | 48 / 35.65 | 26 / 32.03 | 19 / 25.32 |
χ² = Σ(O − E)²/E = 4.573 + 1.214 + 1.684 + 4.278 + 1.135 + 1.576 = 14.46
d.f. = (2 − 1)(3 − 1) = 2, χ²0.05,2 = 5.991. Since 14.46 > 5.991, reject H0: hypertension depends on smoking habits (p ≈ 0.0007).
Q6 (a) – Simple linear regression of y on x
n = 10, Σx = 999, Σy = 670, Σxy = 74058, Σx² = 119969
b = [nΣxy − ΣxΣy] / [nΣx² − (Σx)²] = (740580 − 669330) / (1199690 − 998001) = 71250 / 201689 = 0.3533
a = ȳ − b x̄ = 67 − 0.3533 × 99.9 = 31.71
ŷ = 31.71 + 0.353x (y increases by about 0.35 for each unit increase in x).
Q6 (b) – Multiple regression Y = β₀ + β₁X₁ + β₂X₂
Sums: n = 8, ΣX₁ = 495, ΣX₂ = 31, ΣY = 689, ΣX₁² = 31025, ΣX₂² = 153, ΣX₁X₂ = 1840, ΣX₁Y = 42990, ΣX₂Y = 2612. Normal equations:
689 = 8 b0 + 495 b1 + 31 b2
42990 = 495 b0 + 31025 b1 + 1840 b2
2612 = 31 b0 + 1840 b1 + 153 b2Solving: b₀ = 18.71, b₁ = 1.044, b₂ = 0.721
Ŷ = 18.71 + 1.044X₁ + 0.721X₂. Each extra test-score mark raises the predicted grade by about 1.04 points holding classes missed constant. (The positive coefficient on classes missed is a feature of this small sample, not a general rule.)
Upload a photo in 10 seconds — no form to fill. We clean it, solve it and credit you.
