Probability & Statistics exam preparation.
Practice questions for every unit in the style of the R23 end exam, a model answer for each, and a one-page revision summary. Built on the official syllabus units.
- Practice questions in the exam's style
- Drafted with AI and checked by a second AI pass. Doubtful points were verified against public sources. Report a mistake
- Units
- 5
- Questions
- 60
- 2-mark
- 30
- 10-mark
- 30
- Done
- Checked on
Exam guide
Paper pattern
Semester-end theory paper, 70 marks, from the JNTUK B.Tech R23 Regulations, end-examination pattern for theory subjects.
- Question 1 · 20 marksTen compulsory short-answer questions of 2 marks each (two from every unit).
- Questions 2 to 6 · 50 marksFive either/or questions of 10 marks each, one per unit. You answer one of the two in each.
- The semester-end examination carries 70 marks; internal assessment carries 30.
- Mid-semester examinations are separate: a 20-minute objective paper (10 marks) and a 90-minute subjective paper with three either/or questions of 10 marks (condensed to 15 marks).
- The regulations text does not state the length of the end examination. Use the duration printed on your hall ticket or question paper.
How to split your time
This plan assumes a 3-hour paper. If yours is different, keep the same proportions. Marks per minute stay roughly even across Question 1 and the 10-mark answers.
- 10 minRead the paper and choose one option in each either/or question
- 30 minQuestion 1: ten short answers (about 3 minutes each)
- 130 minQuestions 2 to 6: one 10-mark answer per unit (about 26 minutes each)
- 10 minFinal check of numbering, calculations and diagrams
Study tips for Probability & Statistics
- Much of this subject is calculation, so practise each type until you can lay out the working table quickly: mean and standard deviation, correlation and rank correlation, regression lines, and fitting curves by least squares.
- Write each formula before you substitute into it, and state whether a variance divides by n or by n − 1, so that the examiner can follow your working and give step marks.
- For every test of hypothesis, follow the same steps: state the null and alternative hypotheses, the level of significance, the test statistic and its value, the critical value with its degrees of freedom, and the conclusion.
- Make one table of when to use each test: z for large samples, t for small samples, F for comparing two variances, and chi-square for goodness of fit and independence, with the degrees of freedom of each.
- Learn the binomial, Poisson, uniform and normal distributions together: the probability function, mean and variance of each, and practise converting a normal variable to the standard normal z.
Descriptive Statistics and Methods for Data Science
Syllabus: Data science and an introduction to statistics; Population and sample; Collection of data: primary and secondary data; Types of variables: dependent and independent, categorical and continuous; Data visualization; Measures of central tendency; Measures of variability; Skewness and kurtosis
One-page revision summary
- Data science extracts knowledge from data by combining statistics, computing and domain knowledge, through the steps collect, clean, explore and visualise, model, and communicate.
- Descriptive statistics summarises the data in hand with tables, charts and measures, while inferential statistics draws conclusions about a population from a sample.
- A population is the complete set of units under study and a sample is the part observed; a parameter (μ, σ) describes the population and a statistic (x̄, s) the sample.
- A census examines every unit, while a sample survey saves time and cost by using simple random, stratified, systematic or cluster sampling.
- Primary data are collected first-hand by interview, questionnaire, observation or experiment; secondary data come from published reports, records and databases and must be checked for reliability, suitability and adequacy.
- An independent variable (x) explains or predicts, and a dependent variable (y) is the response that depends on it.
- Categorical variables are nominal (no order) or ordinal (ordered); numerical variables are discrete (counted) or continuous (any value in an interval).
- Bar and pie charts suit categorical data; histograms, frequency polygons, ogives and box plots suit continuous data; a scatter plot shows how y varies with x.
- In a pie chart the sector angle is (f/N) × 360°, and in a histogram the area of each bar is proportional to its class frequency.
- The mean uses every value but is affected by extreme values, the median is a positional average that is not, and the mode is the most frequent value and suits categorical data.
- For a moderately skewed distribution the empirical relation Mode ≈ 3 Median − 2 Mean holds approximately.
- Range, quartile deviation, mean deviation and standard deviation are absolute measures of variability; their coefficients and the coefficient of variation are relative measures.
- The series with the smaller coefficient of variation is the more consistent, even when the two means differ.
- Dividing the sum of squared deviations by n gives the variance of the data themselves; dividing by n − 1 gives the sample variance s² used to estimate the population variance.
- In positive skewness the right tail is longer and the mean is usually the largest average; in negative skewness the left tail is longer and the mean is usually the smallest.
- Kurtosis compares a curve with the normal curve: β₂ = 3 is mesokurtic, β₂ > 3 leptokurtic (more peaked) and β₂ < 3 platykurtic (flatter).
- Bowley's coefficient of skewness uses the quartiles and always lies between −1 and +1.
Learn these by heart
- Grouped data: Mean = A + (Σfd/N) × h; Median = L + ((N/2 − cf)/f) × h; Mode = L + ((f₁ − f₀)/(2f₁ − f₀ − f₂)) × h.
- Standard deviation σ = √(Σ(x − x̄)²/n) and coefficient of variation CV = (σ/x̄) × 100.
- μ₂ = μ′₂ − μ′₁²; μ₃ = μ′₃ − 3μ′₂μ′₁ + 2μ′₁³; μ₄ = μ′₄ − 4μ′₃μ′₁ + 6μ′₂μ′₁² − 3μ′₁⁴.
- β₁ = μ₃²/μ₂³, β₂ = μ₄/μ₂², γ₁ = ±√β₁ (sign of μ₃) and γ₂ = β₂ − 3.
- Karl Pearson: Sk = (Mean − Mode)/σ, or 3(Mean − Median)/σ; Bowley: Sk = (Q₃ + Q₁ − 2 Median)/(Q₃ − Q₁).
2-mark questions
1 What is data science, and what part does statistics play in it? 2 marks
Data science is the study of extracting useful knowledge from data by combining statistics, computing and knowledge of the application area. Statistics supplies its core methods: collecting and summarising data (descriptive statistics), measuring uncertainty, and drawing conclusions about a population from a sample (inferential statistics).
2 Distinguish between a parameter and a statistic. 2 marks
A parameter is a numerical measure of a whole population, such as the population mean μ or standard deviation σ; it is fixed but usually unknown. A statistic is the same kind of measure computed from a sample, such as the sample mean x̄ or s; it varies from sample to sample and is used to estimate the parameter.
3 Distinguish between primary data and secondary data, with one example of each. 2 marks
Primary data are collected first-hand by the investigator for the present purpose, for example answers to a questionnaire given to the students of a class. Secondary data were collected earlier by someone else and are reused, for example figures taken from a published report or an existing database. Primary data suit the purpose better but cost more time and money.
4 How does a histogram differ from a bar chart? 2 marks
A bar chart shows a categorical (or discrete) variable: bars of equal width are separated by gaps, and their heights give the frequencies. A histogram shows a continuous variable grouped into classes: the bars stand side by side with no gaps, and the area of each bar is proportional to the class frequency.
5 Find the mean, median and mode of the data 4, 7, 5, 7, 9, 6, 7, 3. 2 marks
Mean = (4 + 7 + 5 + 7 + 9 + 6 + 7 + 3)/8 = 48/8 = 6. In order: 3, 4, 5, 6, 7, 7, 7, 9; n = 8 is even, so median = (4th + 5th)/2 = (6 + 7)/2 = 6.5. The value 7 occurs most often (three times), so mode = 7.
6 Define kurtosis. How are frequency curves classified using β₂? 2 marks
Kurtosis is the degree of peakedness of a frequency curve, and the weight of its tails, compared with the normal curve. It is measured by β₂ = μ₄/μ₂². If β₂ = 3 the curve is mesokurtic (normal), if β₂ > 3 it is leptokurtic (more peaked, with heavier tails) and if β₂ < 3 it is platykurtic (flatter, with lighter tails); γ₂ = β₂ − 3.
10-mark questions
1 Explain the role of statistics in data science. Distinguish between a population and a sample, and between primary and secondary data, with examples. 10 marks
Data science is the field that turns raw data into useful knowledge and decisions. It combines statistics, computer programming and knowledge of the application area. Statistics is the science of collecting, organising, presenting, analysing and interpreting data, so it supplies most of the methods a data scientist uses.
1. Role of statistics in data science. A data science task usually runs through these steps, and statistics is used at each one:
- Define the question and collect data: plan a survey or experiment and choose a sample.
- Clean and organise the data: find missing values and errors, and arrange the data in tables and frequency distributions.
- Explore and visualise: descriptive statistics, such as the mean, the standard deviation and charts, summarise the data.
- Model and infer: inferential statistics (estimation, testing of hypotheses, regression) draws conclusions about the population from the sample and measures the uncertainty.
- Communicate the results clearly.
2. Population and sample. The population is the complete set of units under study; the sample is the part of it actually observed. Suppose a college with 2,000 students wants the average daily screen time of its students. All 2,000 students form the population, and 100 students chosen by random sampling form a sample. A measure of the population, such as the mean μ, is a parameter; the same measure of the sample, such as the sample mean x̄, is a statistic, and it estimates the parameter.
Studying every unit is a census; it has no sampling error, but it is costly and slow. A sample survey is cheaper and quicker, and it is the only choice when testing destroys the item. Common sampling methods are simple random, stratified, systematic and cluster sampling.
3. Primary and secondary data.
- Primary data are collected first-hand for the present study, by personal interview, questionnaire, observation or experiment. Example: the screen-time figures recorded from the 100 sampled students.
- Secondary data were collected earlier by another agency and are reused, from published reports, government publications, journals, websites or an existing database. Example: attendance figures taken from the college's records.
Primary data fit the purpose exactly but cost more; secondary data are cheap but must be checked for reliability, suitability and adequacy before use.
In short, statistics gives data science its tools for collecting data, summarising it and drawing reliable conclusions from it.
2 Classify variables as dependent or independent and as categorical or continuous, with examples. Explain which charts are used to visualise each type of variable. 10 marks
A variable is a characteristic that can take different values from one unit to another, such as a student's programming language or height. Variables are classified in two ways: by their role in a study and by the type of value they take.
1. By role.
- Independent variable (x): the variable that is changed or controlled, or that is used to explain another; it is also called the explanatory or predictor variable. Example: hours of study.
- Dependent variable (y): the outcome that responds to the independent variable; it is also called the response variable. Example: marks scored.
2. By type of value.
- Categorical (qualitative) variables put units into groups. Nominal variables have no natural order (blood group, programming language); ordinal variables have an order (grades A, B, C; a rating from poor to excellent).
- Numerical (quantitative) variables are counted or measured. Discrete variables take countable values (number of bugs in a program); continuous variables can take any value in an interval (height, time to load a page).
3. Data visualization. A chart shows the pattern in data at a glance, and the right chart depends on the type of variable:
Variable Suitable chart
Categorical Bar chart, pie chart
Discrete Bar (line) diagram
Continuous Histogram, frequency
polygon, ogive, box plot
x and y numerical Scatter plot
Values over time Line chart- Bar chart: bars of equal width, separated by gaps, with heights equal to the frequencies.
- Pie chart: a circle divided into sectors, with sector angle = (f/N) × 360°. Example: if 18, 12 and 10 of 40 students prefer Python, Java and C, the angles are (18/40) × 360° = 162°, (12/40) × 360° = 108° and (10/40) × 360° = 90°, which add up to 360°.
- Histogram: adjacent bars over the class intervals of a continuous variable, with area proportional to frequency; a frequency polygon joins the mid-points of the tops of the bars.
- Ogive: the cumulative frequency curve; the less-than and more-than ogives cross at the median.
- Box plot: draws the five-number summary (minimum, Q1, median, Q3, maximum) and shows outliers.
- Scatter plot: plots the independent variable on the x-axis against the dependent variable on the y-axis to show how they are related.
In conclusion, the role and type of each variable must be identified first, because they decide both the chart and the statistical method that suit the data.
3 Explain the mean, median and mode as measures of central tendency. Calculate all three for the following marks of 50 students in a class test (an invented example): marks 10–20, 20–30, 30–40, 40–50, 50–60 with 5, 12, 16, 10 and 7 students. 10 marks
A measure of central tendency (an average) is a single value that represents the centre of a set of data. The three common averages are:
- Arithmetic mean: the sum of the values divided by their number. It uses every observation and suits further algebra, but extreme values affect it.
- Median: the middle value when the data are arranged in order. It is a positional average, is not affected by extreme values and can be found for open-ended classes.
- Mode: the value that occurs most often. It can be found even for categorical data, but it may not be unique.
For a grouped distribution with class width h:
- Mean = A + (Σfd/N) × h, where x is the mid-value, A an assumed mean and d = (x − A)/h.
- Median = L + ((N/2 − cf)/f) × h, where L is the lower limit of the median class, cf the cumulative frequency before it and f its frequency.
- Mode = L + ((f₁ − f₀)/(2f₁ − f₀ − f₂)) × h, where f₁ is the frequency of the modal class and f₀, f₂ those of the classes before and after it.
Working table (A = 35, h = 10, N = 50):
Marks f x d fd cf
10-20 5 15 -2 -10 5
20-30 12 25 -1 -12 17
30-40 16 35 0 0 33
40-50 10 45 1 10 43
50-60 7 55 2 14 50
Total 50 21. Mean = 35 + (2/50) × 10 = 35 + 0.4 = 35.4 marks.
2. Median: N/2 = 25. The first cumulative frequency of 25 or more is 33, so the median class is 30–40, with L = 30, cf = 17 and f = 16.
Median = 30 + ((25 − 17)/16) × 10 = 30 + 5 = 35 marks.
3. Mode: the highest frequency is 16, so the modal class is 30–40, with f₁ = 16, f₀ = 12 and f₂ = 10.
Mode = 30 + ((16 − 12)/(32 − 12 − 10)) × 10 = 30 + (4/10) × 10 = 34 marks.
4. Check: for a moderately skewed distribution, Mode ≈ 3 Median − 2 Mean = 3(35) − 2(35.4) = 105 − 70.8 = 34.2, which is close to 34.
Result: mean = 35.4 marks, median = 35 marks and mode = 34 marks. Since mean > median > mode, the distribution is slightly positively skewed.
4 What is meant by variability? Explain its absolute and relative measures. The runs scored by two batsmen in five matches (an invented example) are A: 42, 38, 46, 34, 40 and B: 55, 30, 70, 40, 55. Which batsman is more consistent? 10 marks
Variability, or dispersion, is the extent to which the values of a variable are spread around their average. Two sets of data can have the same mean and still differ greatly in spread, so an average alone does not describe data.
Measures of variability:
- Range = H − L (largest minus smallest value); coefficient of range = (H − L)/(H + L).
- Quartile deviation QD = (Q₃ − Q₁)/2; coefficient of QD = (Q₃ − Q₁)/(Q₃ + Q₁).
- Mean deviation MD = Σ|x − A|/n, taken about the mean or the median A; coefficient of MD = MD/A.
- Standard deviation (SD) σ = √(Σ(x − x̄)²/n), the most widely used measure; its square σ² is the variance.
- Coefficient of variation CV = (σ/x̄) × 100.
Absolute measures are in the units of the data; relative measures are pure numbers, so they can compare series with different means or units. The series with the smaller CV is the more consistent.
Working (σ divides by n = 5; d = x − x̄):
A d d² B d d²
42 2 4 55 5 25
38 -2 4 30 -20 400
46 6 36 70 20 400
34 -6 36 40 -10 100
40 0 0 55 5 25
200 80 250 9501. Means: x̄(A) = 200/5 = 40 runs and x̄(B) = 250/5 = 50 runs.
2. Standard deviations:
σ(A) = √(80/5) = √16 = 4 runs.
σ(B) = √(950/5) = √190 = 13.784 runs.
3. Coefficients of variation:
CV(A) = (4/40) × 100 = 10%.
CV(B) = (13.784/50) × 100 = 27.57%.
4. Ranges: 46 − 34 = 12 runs for A and 70 − 30 = 40 runs for B, which tells the same story.
If the sample form with divisor n − 1 is used instead, s(A) = √(80/4) = 4.47 and s(B) = √(950/4) = 15.41, giving CVs of 11.18% and 30.82%; the conclusion does not change.
Conclusion: batsman B scores more on average (50 against 40 runs), but batsman A has the much smaller coefficient of variation (10% against 27.57%), so A is the more consistent batsman.
5 Define moments and give the relations between central moments and moments about an arbitrary origin. For the number of errors per page in 25 pages of a draft (an invented example), x = 0, 1, 2, 3, 4 with f = 2, 12, 6, 4, 1, find the first four central moments, β₁ and β₂, and comment on the skewness and kurtosis. 10 marks
Moments are averages of powers of deviations, and they describe the shape of a frequency distribution.
- Moments about an arbitrary origin A: μ′r = Σf(x − A)ʳ/N.
- Central moments (about the mean x̄): μr = Σf(x − x̄)ʳ/N, so μ₁ = 0 and μ₂ is the variance (divisor N).
Relations between central moments and moments about A:
- μ₂ = μ′₂ − μ′₁²
- μ₃ = μ′₃ − 3μ′₂μ′₁ + 2μ′₁³
- μ₄ = μ′₄ − 4μ′₃μ′₁ + 6μ′₂μ′₁² − 3μ′₁⁴
Karl Pearson's coefficients: β₁ = μ₃²/μ₂³ measures skewness and β₂ = μ₄/μ₂² measures kurtosis; γ₁ = ±√β₁ (with the sign of μ₃) and γ₂ = β₂ − 3.
Working table (A = 2, d = x − 2, N = 25):
x f d fd fd² fd³ fd⁴
0 2 -2 -4 8 -16 32
1 12 -1 -12 12 -12 12
2 6 0 0 0 0 0
3 4 1 4 4 4 4
4 1 2 2 4 8 16
Sum 25 -10 28 -16 641. Moments about A = 2:
μ′₁ = −10/25 = −0.4, μ′₂ = 28/25 = 1.12, μ′₃ = −16/25 = −0.64, μ′₄ = 64/25 = 2.56.
Mean x̄ = A + μ′₁ = 2 − 0.4 = 1.6 errors per page.
2. Central moments:
μ₁ = 0.
μ₂ = 1.12 − (−0.4)² = 1.12 − 0.16 = 0.96.
μ₃ = −0.64 − 3(1.12)(−0.4) + 2(−0.4)³ = −0.64 + 1.344 − 0.128 = 0.576.
μ₄ = 2.56 − 4(−0.64)(−0.4) + 6(1.12)(0.16) − 3(0.0256) = 2.56 − 1.024 + 1.0752 − 0.0768 = 2.5344.
3. Coefficients:
β₁ = 0.576²/0.96³ = 0.331776/0.884736 = 0.375.
β₂ = 2.5344/0.96² = 2.5344/0.9216 = 2.75.
γ₁ = +√0.375 = 0.612 and γ₂ = 2.75 − 3 = −0.25.
4. Comment: μ₃ is positive and β₁ = 0.375 is not zero, so the distribution is positively skewed, with a longer tail towards more errors per page. β₂ = 2.75 < 3, so the distribution is platykurtic, slightly flatter than the normal curve.
Hence the first four central moments are 0, 0.96, 0.576 and 2.5344, with β₁ = 0.375 and β₂ = 2.75.
6 Explain skewness and kurtosis and the measures of skewness. Compute Karl Pearson's coefficient of skewness for the scores of 50 candidates in an aptitude test (an invented example): scores 0–10, 10–20, 20–30, 30–40, 40–50 with frequencies 4, 9, 16, 15, 6. 10 marks
Skewness means lack of symmetry. In a symmetric distribution the two tails of the curve are mirror images and the mean, median and mode are equal. Kurtosis describes how peaked a curve is, and how heavy its tails are, compared with the normal curve.
Types:
- Positive skewness: the right tail is longer; usually mean > median > mode, so the mean is the largest of the three.
- Negative skewness: the left tail is longer; usually mean < median < mode, so the mean is the smallest.
- Kurtosis, by β₂ = μ₄/μ₂²: leptokurtic when β₂ is above 3 (more peaked), mesokurtic when β₂ = 3 (the normal curve) and platykurtic when β₂ is below 3 (flatter).
Measures of skewness:
- Karl Pearson: Sk = (Mean − Mode)/σ, or Sk = 3(Mean − Median)/σ when the mode is ill-defined.
- Bowley: Sk = (Q₃ + Q₁ − 2 Median)/(Q₃ − Q₁), which lies between −1 and +1.
- Moments: β₁ = μ₃²/μ₂³.
A positive Sk means positive skewness and Sk = 0 means symmetry.
Working (A = 25, h = 10, d = (x − 25)/10, N = 50):
Score f x d fd fd²
0-10 4 5 -2 -8 16
10-20 9 15 -1 -9 9
20-30 16 25 0 0 0
30-40 15 35 1 15 15
40-50 6 45 2 12 24
Total 50 10 641. Mean = A + (Σfd/N) × h = 25 + (10/50) × 10 = 27.
2. Standard deviation (divisor N):
σ = h × √(Σfd²/N − (Σfd/N)²) = 10 × √(1.28 − 0.04) = 10 × √1.24 = 11.14.
So the variance is 124.
3. Mode: the modal class is 20–30, with f₁ = 16, f₀ = 9 and f₂ = 15.
Mode = 20 + ((16 − 9)/(32 − 9 − 15)) × 10 = 20 + (7/8) × 10 = 28.75.
4. Karl Pearson's coefficient:
Sk = (27 − 28.75)/11.14 = −1.75/11.14 = −0.157.
Check: the median is 20 + ((25 − 13)/16) × 10 = 27.5, so mean (27) < median (27.5) < mode (28.75), which also shows negative skewness.
Conclusion: Sk = −0.157, so the distribution of scores is slightly negatively skewed, with the longer tail towards the low scores.
Correlation and Regression
Syllabus: Correlation and the correlation coefficient; Rank correlation; Linear regression: fitting a straight line; Multiple linear regression; Regression coefficients and their properties; Curvilinear regression: fitting a parabola; Fitting exponential and power curves
One-page revision summary
- Correlation measures the strength and direction of the linear relationship between two variables; it shows association, not cause and effect.
- Karl Pearson's r = cov(x, y)/(σx σy) lies between −1 and +1, and r = 0 means no linear relationship, though a non-linear one may still exist.
- r is unchanged by a change of origin and by a change of scale with positive factors, and the correlation of x with y equals that of y with x.
- Spearman's rank correlation measures the agreement between two rankings, so it suits data given as ranks or judged only by order.
- For tied values, give each the average of the ranks they share and add (m³ − m)/12 to Σd² for every group of m tied values.
- The method of least squares chooses the constants of a curve so that the sum of the squares of the errors Σ(y − ŷ)² is least.
- For y = a + bx the normal equations are Σy = na + bΣx and Σxy = aΣx + bΣx²; for x on y, interchange x and y.
- Both regression lines pass through the point of means (x̄, ȳ), and they coincide when r = ±1.
- Both regression coefficients have the same sign as r, and if one is numerically greater than 1 the other is less than 1.
- The arithmetic mean of the two regression coefficients is numerically at least |r|.
- Regression coefficients are independent of a change of origin but not of a change of scale.
- In multiple linear regression y = a + b₁x₁ + b₂x₂, the three normal equations come from minimising Σ(y − a − b₁x₁ − b₂x₂)².
- The partial regression coefficient b₁ is the change in y for a unit change in x₁ when x₂ is held fixed.
- A second-degree parabola y = a + bx + cx² needs three normal equations, involving sums of x up to x⁴.
- For an odd number of equally spaced x values, coding u = x − (middle value) makes Σu = Σu³ = 0 and simplifies the parabola's normal equations.
- The exponential curve y = abˣ becomes log y = log a + x log b, a straight line in x and log y.
- The power curve y = axᵇ becomes log y = log a + b log x, a straight line in log x and log y.
Learn these by heart
- r = Σ(x − x̄)(y − ȳ)/√[Σ(x − x̄)² × Σ(y − ȳ)²], with −1 ≤ r ≤ 1.
- Spearman: ρ = 1 − 6[Σd² + Σ(m³ − m)/12]/(n(n² − 1)); drop the correction when there are no ties.
- Regression lines: y − ȳ = byx(x − x̄) and x − x̄ = bxy(y − ȳ), with byx = r σy/σx and bxy = r σx/σy.
- r = ±√(byx × bxy), taking the common sign of the two regression coefficients.
- Parabola normal equations: Σy = na + bΣx + cΣx², Σxy = aΣx + bΣx² + cΣx³, Σx²y = aΣx² + bΣx³ + cΣx⁴.
- For y = abˣ fit Y = A + Bx with Y = log y, then a = antilog A and b = antilog B.
2-mark questions
1 Define correlation. What are positive, negative and zero correlation? 2 marks
Correlation is the relationship between two variables in which a change in one goes with a change in the other. It is positive when both variables move in the same direction, negative when they move in opposite directions, and zero when there is no linear relationship between them, so that r = 0. Correlation shows association, not cause and effect.
2 If cov(X, Y) = 18, σx = 5 and σy = 6, find Karl Pearson's coefficient of correlation. 2 marks
Karl Pearson's coefficient is r = cov(X, Y)/(σx σy) = 18/(5 × 6) = 18/30 = 0.6. Since r always lies between −1 and +1, r = 0.6 shows a moderate positive linear correlation between X and Y.
3 Nine students are ranked in two subjects with no ties, and Σd² = 24. Find Spearman's rank correlation coefficient. 2 marks
Spearman's formula is ρ = 1 − 6Σd²/(n(n² − 1)). With n = 9 and Σd² = 24, ρ = 1 − (6 × 24)/(9 × 80) = 1 − 144/720 = 1 − 0.2 = 0.8. The two rankings show a high positive rank correlation.
4 The regression coefficients of y on x and of x on y are −0.5 and −0.98. Find the correlation coefficient. 2 marks
Since byx × bxy = r², r² = (−0.5)(−0.98) = 0.49, so r = ±0.7. The correlation coefficient has the same sign as the regression coefficients, and both are negative, so r = −0.7.
5 Why are there two lines of regression, and where do they intersect? 2 marks
The line of y on x minimises the sum of squared errors in y and is used to estimate y from x; the line of x on y minimises the squared errors in x and estimates x from y. They coincide only when r = ±1. Both pass through the point of means (x̄, ȳ), so they intersect there.
6 Distinguish between correlation and regression. 2 marks
Correlation measures the strength and direction of the linear relationship between two variables as one number r, which is symmetric in x and y, has no units and lies between −1 and +1. Regression gives an equation estimating one variable from the other and is not symmetric: the line of y on x differs from that of x on y.
10-mark questions
1 Define Karl Pearson's coefficient of correlation, classify correlation and state the properties of r. Calculate r for x: 1, 2, 3, 4, 5, 6, 7 and y: 9, 8, 10, 12, 11, 13, 14. 10 marks
Correlation is the relationship between two variables in which a change in one goes with a change in the other. Karl Pearson's coefficient of correlation r measures the strength and direction of the linear relationship between two quantitative variables x and y.
Correlation is classified in three ways:
- By direction: positive (both variables move in the same direction) or negative (they move in opposite directions).
- By number of variables: simple (two variables), multiple (one variable with two or more others together) and partial (two variables, with the effect of the others removed).
- By form: linear (the points lie near a straight line) or non-linear (they lie near a curve).
Definition: r = cov(x, y)/(σx σy) = Σ(x − x̄)(y − ȳ)/√[Σ(x − x̄)² × Σ(y − ȳ)²]. The covariance and both standard deviations divide by n, so n cancels.
Properties:
1. −1 ≤ r ≤ 1. r = +1 or −1 means perfect linear correlation, and r = 0 means no linear correlation.
2. r is unchanged by a change of origin and by a change of scale with positive factors.
3. r is symmetric: the correlation of x with y equals that of y with x.
4. r is the geometric mean of the two regression coefficients.
Example: find r for x: 1, 2, 3, 4, 5, 6, 7 and y: 9, 8, 10, 12, 11, 13, 14.
Working: n = 7, x̄ = 28/7 = 4 and ȳ = 77/7 = 11. Let dx = x − 4 and dy = y − 11.
x y dx dy dx² dy² dxdy
1 9 -3 -2 9 4 6
2 8 -2 -3 4 9 6
3 10 -1 -1 1 1 1
4 12 0 1 0 1 0
5 11 1 0 1 0 0
6 13 2 2 4 4 4
7 14 3 3 9 9 9
Σ 28 77 0 0 28 28 26r = Σdxdy/√(Σdx² × Σdy²) = 26/√(28 × 28) = 26/28 = 0.9286.
Conclusion: r = 0.9286 is close to +1, so x and y have a high positive linear correlation: larger values of x go with larger values of y.
2 Explain Spearman's rank correlation coefficient and how tied ranks are handled. Calculate it for the marks of eight students in two tests: Test 1: 52, 60, 45, 60, 70, 38, 60, 49 and Test 2: 48, 58, 50, 62, 66, 40, 58, 45. 10 marks
Spearman's rank correlation coefficient ρ measures the agreement between two rankings of the same n individuals. It is used when the data are ranks, for example two judges ranking the same entries, or when only the order of the values matters. Without ties it equals Karl Pearson's r calculated from the ranks, so −1 ≤ ρ ≤ 1.
Formula without ties: ρ = 1 − 6Σd²/(n(n² − 1)), where d = R1 − R2 is the difference between the two ranks of an individual.
Tied ranks: when m values are equal, each gets the average of the ranks they would occupy, and for every such group the correction (m³ − m)/12 is added to Σd²:
ρ = 1 − 6[Σd² + Σ(m³ − m)/12]/(n(n² − 1)).
Steps:
1. Rank each test separately, giving rank 1 to the highest mark.
2. Find d = R1 − R2 and d² for each student.
3. Add the correction for every tied group.
4. Substitute in the formula.
Ranking: in Test 1, 70 gets rank 1; the three marks of 60 share ranks 2, 3 and 4, so each gets 3; then 52, 49, 45 and 38 get ranks 5, 6, 7 and 8. In Test 2, 66 and 62 get ranks 1 and 2; the two marks of 58 share ranks 3 and 4, so each gets 3.5; then 50, 48, 45 and 40 get ranks 5, 6, 7 and 8.
Test1 Test2 R1 R2 d d²
52 48 5 6 -1 1
60 58 3 3.5 -0.5 0.25
45 50 7 5 2 4
60 62 3 2 1 1
70 66 1 1 0 0
38 40 8 8 0 0
60 58 3 3.5 -0.5 0.25
49 45 6 7 -1 1
Σ 0 7.5Corrections: Test 1 has one group with m = 3, giving (27 − 3)/12 = 2; Test 2 has one group with m = 2, giving (8 − 2)/12 = 0.5. The total correction is 2.5.
Σd² plus the corrections is 7.5 + 2.5 = 10, so ρ = 1 − (6 × 10)/(8 × 63) = 1 − 60/504 = 1 − 0.1190 = 0.8810.
Conclusion: ρ = 0.881 shows a high positive agreement between the two rankings: students ranked high in Test 1 tend to be ranked high in Test 2.
3 Explain the method of least squares for fitting a straight line and derive its normal equations. Fit the regression lines of y on x and of x on y to x: 2, 4, 6, 8, 10 and y: 5, 7, 8, 12, 13, find r from the regression coefficients and state their properties. 10 marks
The method of least squares fits the line for which the sum of the squares of the errors between observed and fitted values is least. The line of y on x estimates y from x, and its slope is the regression coefficient byx.
Derivation:
1. For each point the error is e = y − (a + bx). Let E = Σ(y − a − bx)².
2. E is least when ∂E/∂a = 0 and ∂E/∂b = 0. Now ∂E/∂a = −2Σ(y − a − bx) = 0 gives Σy = na + bΣx, and ∂E/∂b = −2Σx(y − a − bx) = 0 gives Σxy = aΣx + bΣx².
These are the normal equations. For the line of x on y, x = a' + b'y, interchange x and y.
Working for the given data (n = 5):
x y x² y² xy
2 5 4 25 10
4 7 16 49 28
6 8 36 64 48
8 12 64 144 96
10 13 100 169 130
Σ 30 45 220 451 3123. Line of y on x: 45 = 5a + 30b and 312 = 30a + 220b. Multiplying the first by 6 and subtracting it from the second, 42 = 40b, so b = 1.05 and a = 9 − 6(1.05) = 2.7. The line is y = 2.7 + 1.05x.
4. Line of x on y: 30 = 5a' + 45b' and 312 = 45a' + 451b'. Multiplying the first by 9 and subtracting it from the second, 42 = 46b', so b' = 21/23 = 0.9130 and a' = 6 − 9b' = 6 − 8.2174 = −2.2174. The line is x = −2.2174 + 0.9130y.
5. The slopes are the regression coefficients: byx = 1.05 and bxy = 0.9130. Since byx × bxy = r², r = +√(1.05 × 21/23) = √0.9587 = 0.9791, positive because both coefficients are positive.
Properties of regression coefficients:
- byx = r σy/σx and bxy = r σx/σy, so r is their geometric mean.
- Both have the same sign as r.
- If one is numerically greater than 1, the other is less than 1, as their product r² cannot exceed 1.
- Their arithmetic mean is numerically at least |r|: here (1.05 + 0.9130)/2 = 0.9815 ≥ 0.9791.
- They are independent of a change of origin but not of a change of scale.
Each line passes through the means (x̄, ȳ) = (6, 9); for example 2.7 + 1.05(6) = 9.
Conclusion: y = 2.7 + 1.05x estimates y from x (at x = 7, y = 10.05), and r = 0.9791 shows a strong positive correlation.
4 Explain how the curves y = abˣ and y = axᵇ are fitted by the method of least squares using logarithms. Fit a curve of the form y = abˣ to x: 0, 1, 2, 3, 4 and y: 4, 7, 12, 19, 34. 10 marks
The exponential curve y = abˣ and the power curve y = axᵇ are not linear in their constants, so least squares applied to them directly gives equations that are hard to solve. Taking logarithms turns each into a straight line, which is then fitted by the method of least squares (this minimises the squared errors in log y).
Exponential curve y = abˣ:
1. Take logarithms to base 10: log y = log a + x log b.
2. Put Y = log y, A = log a and B = log b, so Y = A + Bx, a straight line in x and Y.
3. Normal equations: ΣY = nA + BΣx and ΣxY = AΣx + BΣx².
4. Solve for A and B; then a = antilog A and b = antilog B.
Power curve y = axᵇ:
1. Take logarithms: log y = log a + b log x.
2. Put Y = log y, X = log x and A = log a, so Y = A + bX.
3. Normal equations: ΣY = nA + bΣX and ΣXY = AΣX + bΣX²; then a = antilog A, and b is found directly.
The form y = aeᵇˣ is handled in the same way, since log y = log a + (b log e)x = log a + (0.4343b)x.
Example: fit y = abˣ to x: 0, 1, 2, 3, 4 and y: 4, 7, 12, 19, 34 (n = 5, logarithms to four decimals).
x y Y=log y x² xY
0 4 0.6021 0 0.0000
1 7 0.8451 1 0.8451
2 12 1.0792 4 2.1584
3 19 1.2788 9 3.8364
4 34 1.5315 16 6.1260
Σ 10 5.3367 30 12.9659Normal equations:
5.3367 = 5A + 10B
12.9659 = 10A + 30B
Multiplying the first by 2 and subtracting it from the second, 2.2925 = 10B, so B = 0.22925. Then 5A = 5.3367 − 2.2925 = 3.0442, so A = 0.60884.
a = antilog 0.60884 = 4.063 and b = antilog 0.22925 = 1.695.
The fitted curve is y = 4.063(1.695)ˣ. Check: at x = 2 it gives 11.67 against the observed 12, and at x = 4 it gives 33.54 against 34.
Conclusion: taking logarithms reduces exponential and power curves to straight-line fitting. Here y grows by a factor of about 1.695 for each unit increase in x.
5 Derive the normal equations for fitting a second-degree parabola y = a + bx + cx² by least squares. Fit such a parabola to x: 1, 2, 3, 4, 5 and y: 4, 9, 15, 23, 34, and estimate y at x = 3.5. 10 marks
When the points of a scatter diagram follow a curve rather than a straight line, a curvilinear regression such as the second-degree parabola y = a + bx + cx² is fitted. The method of least squares chooses a, b and c to make the sum of squared errors least.
Derivation:
1. Let E = Σ(y − a − bx − cx²)².
2. Setting ∂E/∂a = 0, ∂E/∂b = 0 and ∂E/∂c = 0 gives the normal equations:
Σy = na + bΣx + cΣx²
Σxy = aΣx + bΣx² + cΣx³
Σx²y = aΣx² + bΣx³ + cΣx⁴
Example: fit the parabola to x: 1, 2, 3, 4, 5 and y: 4, 9, 15, 23, 34 (n = 5), and estimate y at x = 3.5.
Coding: the x values are equally spaced with middle value 3, so put u = x − 3. Then Σu = 0 and Σu³ = 0, and the normal equations become simple. First fit y = A + Bu + Cu².
x y u u² u³ u⁴ uy u²y
1 4 -2 4 -8 16 -8 16
2 9 -1 1 -1 1 -9 9
3 15 0 0 0 0 0 0
4 23 1 1 1 1 23 23
5 34 2 4 8 16 68 136
Σ 85 0 10 0 34 74 1843. Normal equations in u:
85 = 5A + 10C
74 = 10B
184 = 10A + 34C
4. From the second, B = 7.4. Doubling the first gives 170 = 10A + 20C; subtracting this from the third, 14 = 14C, so C = 1. Then 5A = 85 − 10 = 75, so A = 15.
5. So y = 15 + 7.4u + u². Substituting u = x − 3:
y = 15 + 7.4x − 22.2 + x² − 6x + 9 = 1.8 + 1.4x + x².
Check: the fitted values at x = 1, 2, 3, 4, 5 are 4.2, 8.6, 15, 23.4 and 33.8, close to the observed 4, 9, 15, 23 and 34.
Estimate: at x = 3.5, y = 1.8 + 4.9 + 12.25 = 18.95.
Conclusion: the least squares parabola is y = 1.8 + 1.4x + x², and coding x about its middle value cuts the work of solving the three normal equations.
6 Explain multiple linear regression with two independent variables and write its normal equations. Fit y = a + b₁x₁ + b₂x₂ to x₁: 1, 2, 3, 4, 5; x₂: 2, 1, 4, 3, 5; y: 6, 9, 14, 13, 18, and estimate y when x₁ = 4 and x₂ = 4. 10 marks
Multiple linear regression studies how a dependent variable y depends on two or more independent variables together. With two of them the model is y = a + b₁x₁ + b₂x₂, a plane in three dimensions. Here b₁ and b₂ are partial regression coefficients: b₁ is the change in y for a unit change in x₁ when x₂ is held fixed, and b₂ is the change in y for a unit change in x₂ when x₁ is held fixed.
Normal equations: the method of least squares makes E = Σ(y − a − b₁x₁ − b₂x₂)² least. Setting ∂E/∂a, ∂E/∂b₁ and ∂E/∂b₂ to zero gives
Σy = na + b₁Σx₁ + b₂Σx₂
Σx₁y = aΣx₁ + b₁Σx₁² + b₂Σx₁x₂
Σx₂y = aΣx₂ + b₁Σx₁x₂ + b₂Σx₂²
Example: fit the model to x₁: 1, 2, 3, 4, 5; x₂: 2, 1, 4, 3, 5; y: 6, 9, 14, 13, 18 (n = 5), and estimate y when x₁ = 4 and x₂ = 4.
x₁ x₂ y x₁² x₂² x₁x₂ x₁y x₂y
1 2 6 1 4 2 6 12
2 1 9 4 1 2 18 9
3 4 14 9 16 12 42 56
4 3 13 16 9 12 52 39
5 5 18 25 25 25 90 90
Σ 15 15 60 55 55 53 208 2061. Substituting the sums:
60 = 5a + 15b₁ + 15b₂ ...(1)
208 = 15a + 55b₁ + 53b₂ ...(2)
206 = 15a + 53b₁ + 55b₂ ...(3)
2. Multiplying (1) by 3 gives 180 = 15a + 45b₁ + 45b₂. Subtracting this from (2) and from (3):
28 = 10b₁ + 8b₂ ...(4)
26 = 8b₁ + 10b₂ ...(5)
3. Adding (4) and (5): 54 = 18(b₁ + b₂), so b₁ + b₂ = 3. Subtracting (5) from (4): 2 = 2(b₁ − b₂), so b₁ − b₂ = 1. Hence b₁ = 2 and b₂ = 1.
4. From (1): 5a = 60 − 30 − 15 = 15, so a = 3.
The fitted regression equation is y = 3 + 2x₁ + x₂. Its fitted values 7, 8, 13, 14 and 18 are close to the observed 6, 9, 14, 13 and 18.
Estimate: for x₁ = 4 and x₂ = 4, y = 3 + 8 + 4 = 15.
Conclusion: y rises by 2 for each unit increase in x₁ with x₂ fixed, and by 1 for each unit increase in x₂ with x₁ fixed.
Probability and Distributions
Syllabus: Probability; Conditional probability and Bayes' theorem; Discrete and continuous random variables; Distribution functions: probability mass, probability density and cumulative distribution functions; Mathematical expectation and variance; The binomial distribution; The Poisson distribution; The uniform distribution; The normal distribution
One-page revision summary
- Classical probability is P(A) = (number of favourable outcomes)/(total number of equally likely outcomes), and every probability lies between 0 and 1.
- For any two events P(A ∪ B) = P(A) + P(B) − P(A ∩ B), which reduces to P(A) + P(B) when A and B are mutually exclusive.
- The multiplication rule P(A ∩ B) = P(A) P(B | A) becomes P(A ∩ B) = P(A) P(B) when A and B are independent.
- The theorem of total probability, P(A) = Σ P(Ei) P(A | Ei), supplies the denominator of Bayes' theorem, which turns priors P(Ei) into posteriors P(Ei | A).
- A discrete random variable takes countably many values and has a pmf; a continuous one takes every value in an interval, has a pdf and gives P(X = a) = 0.
- A pmf satisfies p(x) ≥ 0 and Σ p(x) = 1; a pdf satisfies f(x) ≥ 0 and ∫ f(x) dx = 1, and its probabilities are areas under f(x).
- The CDF F(x) = P(X ≤ x) rises from 0 to 1 without decreasing, is a step function for a discrete variable, and satisfies F′(x) = f(x) for a continuous one.
- The mean is E(X) = Σ x p(x) or ∫ x f(x) dx, and the variance Var(X) = E(X²) − [E(X)]² is never negative.
- E(aX + b) = aE(X) + b and Var(aX + b) = a² Var(X), so adding a constant shifts the mean without changing the variance.
- The binomial distribution P(X = x) = nCx p^x q^(n−x) needs n independent trials with a constant success probability p; its mean np is larger than its variance npq.
- The Poisson distribution P(X = x) = e^(−λ) λ^x/x! models counts of rare events, has mean = variance = λ, and satisfies P(x + 1) = [λ/(x + 1)] P(x).
- When n is large and p is small, binomial probabilities are approximated by Poisson probabilities with λ = np.
- The uniform distribution on (a, b) has f(x) = 1/(b − a) and F(x) = (x − a)/(b − a) for a ≤ x ≤ b; integrating gives E(X) = ∫ x/(b − a) dx = (a + b)/2 and E(X²) = (a² + ab + b²)/3, so Var(X) = E(X²) − [E(X)]² = (b − a)²/12.
- The normal curve is symmetric about μ with mean = median = mode, and about 68.27%, 95.45% and 99.73% of its area lies within one, two and three standard deviations of the mean.
- To find a normal probability, standardise with z = (x − μ)/σ, read the area from the standard normal table, and use symmetry for negative z.
Learn these by heart
- P(A ∪ B) = P(A) + P(B) − P(A ∩ B) and P(A | B) = P(A ∩ B)/P(B), with P(B) > 0.
- Bayes' theorem: P(Ei | A) = P(Ei) P(A | Ei) / Σ P(Ej) P(A | Ej).
- Var(X) = E(X²) − [E(X)]², for both discrete and continuous random variables.
- Binomial: mean np and variance npq; Poisson: mean = variance = λ.
- Uniform on (a, b): mean (a + b)/2 and variance (b − a)²/12.
- Normal: Z = (X − μ)/σ follows N(0, 1).
2-mark questions
1 State the axioms of probability. 2 marks
For a sample space S, a probability function P assigns to each event A a number P(A) such that:
- Axiom 1: P(A) ≥ 0.
- Axiom 2: P(S) = 1.
- Axiom 3: for mutually exclusive events A1, A2, …, P(A1 ∪ A2 ∪ …) = P(A1) + P(A2) + ….
Consequences: P(∅) = 0, P(A′) = 1 − P(A) and 0 ≤ P(A) ≤ 1.
2 Define conditional probability. If P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2, find P(A | B) and say whether A and B are independent. 2 marks
The conditional probability of A given B is P(A | B) = P(A ∩ B)/P(B), provided P(B) > 0. Here P(A | B) = 0.2/0.4 = 0.5. Since P(A | B) = P(A) = 0.5, or equivalently P(A)P(B) = 0.5 × 0.4 = 0.2 = P(A ∩ B), the events A and B are independent.
3 Distinguish between a discrete and a continuous random variable, with an example of each. 2 marks
A random variable assigns a real number to each outcome. A discrete one takes countably many values, such as the number of heads in three coin tosses, and has a probability mass function. A continuous one takes any value in an interval, such as the time taken to finish a test, and has a probability density function, with P(X = a) = 0 at each point.
4 A continuous random variable X has density f(x) = kx for 0 ≤ x ≤ 4 and 0 elsewhere. Find k and the cumulative distribution function F(x). 2 marks
The total area must be 1: ∫₀⁴ kx dx = k(16/2) = 8k = 1, so k = 1/8. Then F(x) = ∫₀ˣ (t/8) dt = x²/16 for 0 ≤ x ≤ 4, with F(x) = 0 for x < 0 and F(x) = 1 for x > 4. For example, P(X ≤ 2) = F(2) = 4/16 = 1/4.
5 The mean and variance of a binomial distribution are 4 and 3. Find n, p and P(X = 0). 2 marks
For a binomial distribution, mean = np and variance = npq. Dividing, q = npq/np = 3/4, so p = 1 − 3/4 = 1/4 and n = 4/(1/4) = 16. Then P(X = 0) = q^n = (3/4)^16 ≈ 0.0100.
6 X is uniformly distributed on (2, 8). Write its density and find its mean, variance and P(3 < X < 5). 2 marks
For the uniform distribution on (a, b), f(x) = 1/(b − a) for a < x < b and 0 elsewhere. Here f(x) = 1/6 for 2 < x < 8. Mean = (a + b)/2 = (2 + 8)/2 = 5. Variance = (b − a)²/12 = 36/12 = 3. P(3 < X < 5) = (5 − 3)/6 = 1/3.
10-mark questions
1 State and prove the addition theorem of probability for two events. In an example class of 60 students, 30 study Python, 25 study Java and 10 study both. A student is chosen at random. Find the probability that the student studies (i) Python or Java, (ii) neither, (iii) only Java, and (iv) Python, given that the student studies Java. Are the two events independent? 10 marks
Probability measures how likely an event is. The addition theorem gives the probability that at least one of two events happens when the events can overlap.
Statement: for any two events A and B of a sample space S,
P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
If A and B are mutually exclusive, P(A ∩ B) = 0 and P(A ∪ B) = P(A) + P(B).
Proof:
1. A ∪ B is the union of the disjoint events A and A′ ∩ B. By the third axiom, P(A ∪ B) = P(A) + P(A′ ∩ B).
2. B is the union of the disjoint events A ∩ B and A′ ∩ B, so P(B) = P(A ∩ B) + P(A′ ∩ B), that is, P(A′ ∩ B) = P(B) − P(A ∩ B).
3. Substituting step 2 into step 1 gives P(A ∪ B) = P(A) + P(B) − P(A ∩ B). The common part is subtracted once because P(A) + P(B) counts it twice.
Problem: let A be the event "studies Python" and B the event "studies Java". Of the 60 students, 20 study only Python, 10 study both, 15 study only Java and 15 study neither.
P(A) = 30/60 = 1/2, P(B) = 25/60 = 5/12 and P(A ∩ B) = 10/60 = 1/6.
(i) Python or Java: P(A ∪ B) = 1/2 + 5/12 − 1/6 = 6/12 + 5/12 − 2/12 = 9/12 = 3/4 = 0.75, which is 45 students.
(ii) Neither: P(A′ ∩ B′) = 1 − P(A ∪ B) = 1 − 3/4 = 1/4, which is 15 students.
(iii) Only Java: P(A′ ∩ B) = P(B) − P(A ∩ B) = 25/60 − 10/60 = 15/60 = 1/4.
(iv) Python given Java: P(A | B) = P(A ∩ B)/P(B) = (1/6)/(5/12) = 12/30 = 2/5 = 0.4.
Independence: P(A) × P(B) = 1/2 × 5/12 = 5/24 ≈ 0.208, but P(A ∩ B) = 1/6 ≈ 0.167. These differ, so the events are not independent; equivalently, P(A | B) = 0.4 is not equal to P(A) = 0.5.
Conclusion: the addition theorem removes the overlap that is counted twice. For three events it extends to P(A ∪ B ∪ C) = P(A) + P(B) + P(C) − P(A ∩ B) − P(B ∩ C) − P(A ∩ C) + P(A ∩ B ∩ C).
2 State and prove Bayes' theorem. In an example factory, machines M1, M2 and M3 make 50%, 30% and 20% of the bolts, and 3%, 4% and 5% of their bolts respectively are defective. A bolt picked at random is found to be defective. Find the probability that it was made by each machine. 10 marks
Bayes' theorem revises the probabilities of the possible causes of an event once the event has been observed. It turns prior probabilities into posterior probabilities.
Statement: let E1, E2, …, En be mutually exclusive and exhaustive events with P(Ei) > 0, and let A be any event with P(A) > 0. Then, for i = 1, 2, …, n,
P(Ei | A) = P(Ei) P(A | Ei) / [P(E1) P(A | E1) + … + P(En) P(A | En)].
Proof:
1. Since the Ei are mutually exclusive and exhaustive, A = (A ∩ E1) ∪ (A ∩ E2) ∪ … ∪ (A ∩ En), a union of disjoint events.
2. By the addition axiom and the multiplication rule P(A ∩ Ei) = P(Ei) P(A | Ei), we get P(A) = Σ P(Ei) P(A | Ei). This is the theorem of total probability.
3. By the definition of conditional probability, P(Ei | A) = P(A ∩ Ei)/P(A) = P(Ei) P(A | Ei) / Σ P(Ej) P(A | Ej).
Problem: let D be the event that a bolt picked at random is defective. The priors are P(M1) = 0.5, P(M2) = 0.3 and P(M3) = 0.2, and the likelihoods are P(D | M1) = 0.03, P(D | M2) = 0.04 and P(D | M3) = 0.05. Each bolt is either defective or not defective, so the not defective branches carry 0.97, 0.96 and 0.95.
Step 1, the product along each defective branch:
Machine P(Mi) P(D|Mi) P(Mi)P(D|Mi)
M1 0.5 0.03 0.015
M2 0.3 0.04 0.012
M3 0.2 0.05 0.010
Total 0.037Step 2, total probability: P(D) = 0.015 + 0.012 + 0.010 = 0.037.
Step 3, posteriors by Bayes' theorem:
- P(M1 | D) = 0.015/0.037 = 15/37 ≈ 0.4054
- P(M2 | D) = 0.012/0.037 = 12/37 ≈ 0.3243
- P(M3 | D) = 0.010/0.037 = 10/37 ≈ 0.2703
Check: 15/37 + 12/37 + 10/37 = 37/37 = 1.
Conclusion: M1 is still the most probable source of a defective bolt, but its share falls from 50% to about 40.5%, while M3, which has the highest defect rate, rises from 20% to about 27.0%.
3 Define the probability mass function and the cumulative distribution function of a discrete random variable. A discrete random variable X takes the values 0, 1, 2, 3 and 4 with probabilities 3k, 5k, 6k, 4k and 2k. Find k, the distribution function F(x), P(X ≤ 2), P(X ≥ 2), the mean and variance of X, and the mean and variance of Y = 2X + 3. 10 marks
A random variable is a real-valued function on the sample space. It is discrete when its values can be listed (finitely or countably many) and continuous when it can take every value in an interval. A discrete variable is described by a probability mass function p(x), a continuous one by a probability density function (pdf) f(x), and both have a cumulative distribution function.
Definitions:
- The probability mass function (pmf) of a discrete X is p(x) = P(X = x), with p(x) ≥ 0 and Σ p(x) = 1.
- The cumulative distribution function (CDF) is F(x) = P(X ≤ x). For a discrete X it is the sum of p(t) over t ≤ x; for a continuous X it is the integral of f(t) from −∞ to x. F is non-decreasing, F(−∞) = 0, F(∞) = 1 and P(a < X ≤ b) = F(b) − F(a).
Problem:
1. Find k: 3k + 5k + 6k + 4k + 2k = 20k = 1, so k = 1/20 = 0.05, and the probabilities are 0.15, 0.25, 0.30, 0.20 and 0.10.
2. Working table:
x p(x) F(x) x p(x) x² p(x)
0 0.15 0.15 0.00 0.00
1 0.25 0.40 0.25 0.25
2 0.30 0.70 0.60 1.20
3 0.20 0.90 0.60 1.80
4 0.10 1.00 0.40 1.60
Σ 1.00 1.85 4.85So F(x) = 0 for x < 0, 0.15 for 0 ≤ x < 1, 0.40 for 1 ≤ x < 2, 0.70 for 2 ≤ x < 3, 0.90 for 3 ≤ x < 4 and 1 for x ≥ 4.
3. P(X ≤ 2) = F(2) = 0.70, and P(X ≥ 2) = 1 − F(1) = 1 − 0.40 = 0.60.
4. Mean: E(X) = Σ x p(x) = 1.85.
5. Variance: E(X²) = Σ x² p(x) = 4.85, so Var(X) = E(X²) − [E(X)]² = 4.85 − 1.85² = 4.85 − 3.4225 = 1.4275, and the standard deviation is √1.4275 ≈ 1.195.
6. For Y = 2X + 3, use E(aX + b) = aE(X) + b and Var(aX + b) = a² Var(X): E(Y) = 2(1.85) + 3 = 6.7 and Var(Y) = 4(1.4275) = 5.71. Adding the constant 3 shifts the mean but does not change the spread.
Conclusion: k = 0.05, E(X) = 1.85 and Var(X) = 1.4275. The CDF of a discrete variable is a step function that jumps by p(x) at each value x.
4 A continuous random variable X has the probability density function f(x) = kx²(3 − x) for 0 ≤ x ≤ 3 and f(x) = 0 elsewhere. Find (i) k, (ii) the cumulative distribution function F(x), (iii) P(X ≤ 1), P(1 < X < 2) and P(X > 2), and (iv) the mean, variance and standard deviation of X. 10 marks
For a continuous random variable, probabilities are areas under the probability density function f(x). A valid pdf has f(x) ≥ 0 and total area ∫ f(x) dx = 1. The CDF is F(x) = P(X ≤ x) = ∫ f(t) dt from −∞ to x, so P(a < X < b) = F(b) − F(a) and F′(x) = f(x). The mean is E(X) = ∫ x f(x) dx and the variance is Var(X) = E(X²) − [E(X)]².
1. Finding k: the total area must be 1.
∫₀³ kx²(3 − x) dx = k[x³ − x⁴/4]₀³ = k(27 − 81/4) = 27k/4 = 1, so k = 4/27.
Since x²(3 − x) ≥ 0 on [0, 3], f is a valid pdf.
2. The CDF: for 0 ≤ x ≤ 3,
F(x) = (4/27) ∫₀ˣ (3t² − t³) dt = (4/27)(x³ − x⁴/4) = (4x³ − x⁴)/27.
So F(x) = 0 for x < 0, (4x³ − x⁴)/27 for 0 ≤ x ≤ 3, and 1 for x > 3. Check: F(3) = (108 − 81)/27 = 1.
3. Probabilities:
- P(X ≤ 1) = F(1) = (4 − 1)/27 = 3/27 = 1/9 ≈ 0.1111
- P(1 < X < 2) = F(2) − F(1) = (32 − 16)/27 − 3/27 = 13/27 ≈ 0.4815
- P(X > 2) = 1 − F(2) = 1 − 16/27 = 11/27 ≈ 0.4074
These add to (3 + 13 + 11)/27 = 1, as they must.
4. Mean:
E(X) = (4/27) ∫₀³ (3x³ − x⁴) dx = (4/27)[3x⁴/4 − x⁵/5]₀³ = (4/27)(243/4 − 243/5) = (4/27)(243/20) = 9/5 = 1.8.
5. Variance:
E(X²) = (4/27) ∫₀³ (3x⁴ − x⁵) dx = (4/27)[3x⁵/5 − x⁶/6]₀³ = (4/27)(729/5 − 729/6) = (4/27)(729/30) = 18/5 = 3.6.
Var(X) = E(X²) − [E(X)]² = 3.6 − 1.8² = 3.6 − 3.24 = 0.36, so the standard deviation is √0.36 = 0.6.
Conclusion: k = 4/27, F(x) = (4x³ − x⁴)/27 on [0, 3], E(X) = 1.8, Var(X) = 0.36 and the standard deviation is 0.6. Because P(X = a) = 0 for every single value a, P(X ≤ 1) and P(X < 1) are equal for a continuous variable.
5 Show that the Poisson distribution is a limiting case of the binomial distribution, and derive its mean and variance. In an example production line, 2% of the chips made are defective. For a box of 100 chips, find the probability of no defective chip and of at most two defective chips, using both the binomial distribution and its Poisson approximation. 10 marks
The binomial distribution B(n, p) gives the probability of x successes in n independent trials, each with the same success probability p: P(X = x) = nCx p^x q^(n−x), x = 0, 1, …, n, where q = 1 − p. Its mean is np and its variance is npq. When n is large and p is small it is tedious to evaluate, and the Poisson distribution takes its place.
1. Poisson as a limit: let n → ∞ and p → 0 while np = λ stays fixed, so p = λ/n. Then
P(X = x) = [n(n − 1)…(n − x + 1)/x!] (λ/n)^x (1 − λ/n)^(n−x)
= (λ^x/x!) × [1(1 − 1/n)…(1 − (x − 1)/n)] × (1 − λ/n)^n × (1 − λ/n)^(−x).
As n → ∞, the bracket tends to 1, (1 − λ/n)^n tends to e^(−λ) and (1 − λ/n)^(−x) tends to 1. Hence
P(X = x) = e^(−λ) λ^x / x!, x = 0, 1, 2, …,
which is the Poisson distribution with parameter λ.
2. Mean: E(X) = Σ x e^(−λ) λ^x/x! = λ e^(−λ) Σ λ^(x−1)/(x − 1)!, summed from x = 1, = λ e^(−λ) e^λ = λ.
3. Variance: E[X(X − 1)] = Σ x(x − 1) e^(−λ) λ^x/x! = λ² e^(−λ) Σ λ^(x−2)/(x − 2)!, summed from x = 2, = λ². So E(X²) = λ² + λ and Var(X) = E(X²) − [E(X)]² = λ² + λ − λ² = λ. The mean and the variance of a Poisson distribution are both λ.
4. Problem: n = 100, p = 0.02 and q = 0.98, so λ = np = 2.
x Binomial Poisson
0 0.1326 0.1353
1 0.2707 0.2707
2 0.2734 0.2707
≤2 0.6767 0.6767Binomial working: P(0) = 0.98^100 ≈ 0.1326, P(1) = 100(0.02)(0.98^99) ≈ 0.2707 and P(2) = 4950(0.02)²(0.98^98) ≈ 0.2734, where 4950 = 100C2.
Poisson working: P(0) = e^(−2) ≈ 0.1353, P(1) = 2e^(−2) ≈ 0.2707, P(2) = (2²/2!)e^(−2) = 2e^(−2) ≈ 0.2707, so P(X ≤ 2) = 5e^(−2) ≈ 0.6767.
So the probability of no defective chip is 0.1326 by the binomial and 0.1353 by the Poisson, a difference of under 0.003, and the probability of at most two defective chips is 0.6767 to four decimals by both.
Conclusion: for large n and small p, B(n, p) is closely approximated by the Poisson distribution with λ = np, whose mean and variance are equal.
6 Write the probability density function of the normal distribution and state its main properties. In an example test, the marks X are normally distributed with mean 62 and standard deviation 8. Find (i) P(X > 74), (ii) P(50 < X < 70), (iii) P(X < 46) and (iv) the mark above which the top 10% of students lie. (v) If 500 students took the test, about how many scored above 74? 10 marks
The normal distribution is the most widely used continuous distribution: many measurements cluster around a central value, and sums of many small independent effects are approximately normal.
Density: a random variable X ~ N(μ, σ²) has
f(x) = [1/(σ√(2π))] e^(−(x − μ)²/(2σ²)), −∞ < x < ∞, σ > 0.
Properties:
- The curve is bell-shaped and symmetric about x = μ, so mean = median = mode = μ.
- The total area under the curve is 1, and the curve approaches the x-axis on both sides without touching it.
- The variance is σ², and the points of inflection are at x = μ ± σ.
- The mean deviation about the mean is about 0.8σ (more exactly 0.7979σ).
- About 68.27%, 95.45% and 99.73% of the area lies within μ ± σ, μ ± 2σ and μ ± 3σ.
- To standardise, put Z = (X − μ)/σ; then Z ~ N(0, 1), and its areas are read from the normal table.
Problem: μ = 62 and σ = 8, so X ~ N(62, 8²) and z = (x − 62)/8. The table gives the area from 0 to z as 0.3413 for z = 1, 0.4332 for z = 1.5 and 0.4772 for z = 2.
(i) x = 74 gives z = 12/8 = 1.5, so P(X > 74) = P(Z > 1.5) = 0.5 − 0.4332 = 0.0668.
(ii) x = 50 gives z = −1.5 and x = 70 gives z = 1. By symmetry, P(50 < X < 70) = P(−1.5 < Z < 1) = 0.4332 + 0.3413 = 0.7745.
(iii) x = 46 gives z = −16/8 = −2, so P(X < 46) = P(Z < −2) = 0.5 − 0.4772 = 0.0228.
(iv) The top 10% lie above the z for which the area from 0 to z is 0.40. That is z ≈ 1.2816 (1.28 in a two-decimal table), so x = 62 + 8(1.2816) ≈ 72.25. The top 10% scored above about 72.25 marks.
(v) Of 500 students, about 500 × 0.0668 = 33.4, that is, about 33 students scored above 74.
Conclusion: every normal probability is found the same way: standardise x to z = (x − μ)/σ, read the area from 0 to z in the table, and use symmetry about z = 0 to get the required probability.
Sampling Theory
Syllabus: Population and samples; Sampling distributions of means and variance (definition only); Point and interval estimation; Maximum error of estimate; The central limit theorem (without proof); Estimation using the t, chi-square and F distributions
One-page revision summary
- A population is the complete set of units under study, and a sample is the part of it actually observed, with sample size n.
- A parameter (μ, σ², P) is a fixed constant of the population, while a statistic (x̄, s², p) is computed from a sample and varies from sample to sample.
- Samples with n ≥ 30 are treated as large and those with n < 30 as small; small samples from normal populations need the t, chi-square or F distributions.
- The sampling distribution of a statistic is its probability distribution over all possible samples of the same size, and its standard deviation is called the standard error.
- The sampling distribution of the mean has mean μ and standard error σ/√n, multiplied by √((N − n)/(N − 1)) when sampling without replacement from a finite population.
- The sampling distribution of the variance is the distribution of s² over all samples of size n; for a normal population (n − 1)s²/σ² is chi-square with n − 1 degrees of freedom.
- A point estimate is one value, such as x̄ for μ, while an interval estimate gives confidence limits with a stated confidence coefficient 1 − α.
- A good estimator is unbiased, consistent, efficient and sufficient; x̄ is unbiased for μ, and s² with divisor n − 1 is unbiased for σ².
- For large-sample intervals use z(α/2) = 1.645, 1.96 and 2.58 for 90%, 95% and 99% confidence.
- The maximum error of estimate E = z(α/2)·σ/√n is the largest difference between x̄ and μ that is expected at confidence 1 − α.
- The sample size needed for a given maximum error E is n = (z(α/2)·σ/E)², always rounded up to the next whole number.
- A higher confidence level or a smaller sample gives a wider interval, and halving the maximum error needs four times the sample size.
- The central limit theorem says that the mean of a large random sample from any population with finite variance is approximately normal with mean μ and standard error σ/√n.
- For a small sample from a normal population with σ unknown, the interval for μ is x̄ ± t(α/2)·s/√n with n − 1 degrees of freedom.
- The interval for a variance is (n − 1)s²/χ²(α/2) < σ² < (n − 1)s²/χ²(1 − α/2), with n − 1 degrees of freedom.
- The interval for σ₁²/σ₂² divides s₁²/s₂² by the upper α/2 point F(ν₁, ν₂) for the lower limit and multiplies it by the upper α/2 point F(ν₂, ν₁) for the upper limit, where ν₁ = n₁ − 1 and ν₂ = n₂ − 1.
Learn these by heart
- Standard error of the mean: SE = σ/√n (with replacement or infinite population).
- Large-sample interval: x̄ − z(α/2)·σ/√n < μ < x̄ + z(α/2)·σ/√n.
- Maximum error E = z(α/2)·σ/√n; required sample size n = (z(α/2)·σ/E)².
- Small-sample interval: x̄ ± t(α/2)·s/√n, with s² = Σ(x − x̄)²/(n − 1) and ν = n − 1.
- Chi-square interval: (n − 1)s²/χ²(α/2) < σ² < (n − 1)s²/χ²(1 − α/2).
- F interval: (s₁²/s₂²)/F(ν₁, ν₂) < σ₁²/σ₂² < (s₁²/s₂²)·F(ν₂, ν₁), where both F values are upper α/2 points (2.5% for 95%).
- CLT: Z = (x̄ − μ)/(σ/√n) tends to N(0, 1) as n → ∞; used when n ≥ 30.
2-mark questions
1 Define population and sample, and distinguish a parameter from a statistic. 2 marks
A population is the whole collection of units under study, finite (size N) or infinite. A sample is the part of it selected and observed; its size is n.
A parameter (μ, σ², P) is a fixed constant of the population, while a statistic (x̄, s², p) is computed from a sample and varies from sample to sample.
2 What is the sampling distribution of the mean? Define its standard error. 2 marks
The sampling distribution of the mean is the probability distribution of x̄ over all possible samples of size n from a population; its mean is μ.
Its standard deviation is the standard error: σ/√n with replacement (or for an infinite population), and (σ/√n)·√((N − n)/(N − 1)) without replacement from a population of size N.
3 Distinguish between a point estimate and an interval estimate, with an example. 2 marks
A point estimate is a single value computed from a sample and used as the value of a parameter, for example x̄ = 52 for μ.
An interval estimate is a range with a stated confidence, for example 49.5 < μ < 54.5 with 95% confidence; unlike a point estimate, it shows how precise the estimate is.
4 A sample of 64 is taken from a population with σ = 10. Find the maximum error of estimate of μ with 95% confidence. 2 marks
Maximum error of estimate: E = z(α/2)·σ/√n, and z(α/2) = 1.96 for 95% confidence (two-tailed, 2.5% in each tail).
E = 1.96 × 10/√64 = 1.96 × 10/8 = 1.96 × 1.25 = 2.45.
So, with 95% confidence, the sample mean differs from μ by at most 2.45.
5 State the central limit theorem. 2 marks
If x̄ is the mean of a random sample of size n drawn from any population with mean μ and finite variance σ², then as n → ∞ the distribution of Z = (x̄ − μ)/(σ/√n) approaches the standard normal distribution N(0, 1).
In practice the normal approximation is used when n ≥ 30, whatever the shape of the population.
6 Write the confidence interval for the mean of a normal population when σ is unknown and the sample is small. 2 marks
For a small sample (n < 30) with σ unknown, the 100(1 − α)% confidence interval for μ is x̄ − t(α/2)·s/√n < μ < x̄ + t(α/2)·s/√n.
Here s² = Σ(x − x̄)²/(n − 1) and t(α/2) has n − 1 degrees of freedom. For n = 16 at 95%, t(0.025) = 2.131 with 15 degrees of freedom.
10-mark questions
1 Explain population, sample, parameter and statistic. Define the sampling distributions of the mean and of the variance, and illustrate the sampling distribution of the mean using the population {2, 4, 6} with samples of size 2 drawn with replacement. 10 marks
Sampling theory studies how values computed from samples behave, so that a whole population can be judged from a part of it.
1. Population: the whole set of units under study, such as all bolts made by a machine. It is finite (size N) or infinite.
2. Sample: a part of the population chosen for study; the number of units in it is the sample size n. A sample with n ≥ 30 is usually called large and one with n < 30 small. In simple random sampling every unit has the same chance of selection. With replacement there are Nⁿ possible samples; without replacement there are C(N, n).
3. Parameter and statistic: a parameter is a constant of the population, such as the mean μ, the variance σ² or the proportion P. A statistic is computed from a sample, such as x̄, s² or p, and it changes from sample to sample.
4. Sampling distribution: if k samples of size n are possible, each gives one value of a statistic, and the probability distribution of these k values is its sampling distribution.
5. Sampling distribution of the mean: the distribution of x̄. Its mean is μ, and its standard deviation, called the standard error (SE), is σ/√n for an infinite population or sampling with replacement, and (σ/√n)·√((N − n)/(N − 1)) without replacement.
6. Sampling distribution of the variance: the distribution of the sample variance s² over all samples of size n. For a normal population, with s² = Σ(x − x̄)²/(n − 1), the quantity (n − 1)s²/σ² follows the chi-square distribution with n − 1 degrees of freedom.
Illustration: take the population {2, 4, 6}. Here N = 3, μ = (2 + 4 + 6)/3 = 4 and σ² = [(2 − 4)² + (4 − 4)² + (6 − 4)²]/3 = 8/3 (dividing by N). With replacement there are 3² = 9 samples of size n = 2:
Sample Mean Sample Mean Sample Mean
(2,2) 2 (4,2) 3 (6,2) 4
(2,4) 3 (4,4) 4 (6,4) 5
(2,6) 4 (4,6) 5 (6,6) 6- Mean of the 9 sample means = (2 + 3 + 4 + 3 + 4 + 5 + 4 + 5 + 6)/9 = 36/9 = 4 = μ.
- Variance of the sample means = Σ(x̄ − 4)²/9 = (4 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 4)/9 = 12/9 = 4/3.
- This equals σ²/n = (8/3)/2 = 4/3, so SE = √(4/3) = 1.155.
Conclusion: every statistic has its own sampling distribution; the sample mean is centred on μ and its spread σ/√n shrinks as n grows.
2 Explain point estimation and interval estimation. State the properties of a good estimator, and find unbiased point estimates of μ and σ² from the sample 4, 6, 8, 10, 12. 10 marks
Estimation means using sample data to find an approximate value of an unknown population parameter θ, such as μ or σ². The rule or formula used is an estimator θ̂, and the value it gives for a particular sample is an estimate.
1. Point estimation: a single value computed from the sample is taken as θ. The sample mean x̄ is a point estimate of μ, s² = Σ(x − x̄)²/(n − 1) of σ², and the sample proportion p of P.
2. Interval estimation: two limits θ₁ and θ₂ are found from the sample so that P(θ₁ < θ < θ₂) = 1 − α. The range (θ₁, θ₂) is a confidence interval, θ₁ and θ₂ are the confidence limits, and 1 − α is the confidence coefficient (0.95 for 95%). For a large sample the interval is x̄ ± E, where E = z(α/2)·σ/√n is the maximum error of estimate.
3. Properties of a good estimator θ̂:
- Unbiased: E(θ̂) = θ. x̄ is unbiased for μ, and s² with divisor n − 1 is unbiased for σ²; the divisor n gives a biased estimate.
- Consistent: θ̂ approaches θ in probability as n → ∞; it is enough that E(θ̂) → θ and Var(θ̂) → 0.
- Efficient: of two unbiased estimators, the one with the smaller variance is more efficient. For a normal population the sample mean is more efficient than the sample median.
- Sufficient: it uses all the information that the sample contains about θ.
Illustration: a random sample gives 4, 6, 8, 10, 12 (n = 5).
- Point estimate of μ: x̄ = 40/5 = 8.
- Σ(x − x̄)² = 16 + 4 + 0 + 4 + 16 = 40.
- Unbiased point estimate of σ²: s² = 40/(5 − 1) = 10.
- Dividing by n would give 40/5 = 8; that estimator is biased, because on average it underestimates σ².
Conclusion: a point estimate gives one value but no measure of its accuracy, while an interval estimate attaches a confidence coefficient and a maximum error, so in practice both are reported.
3 State the central limit theorem and explain its importance. A population has mean 50 and standard deviation 12. For a random sample of 36, find P(48 < x̄ < 53) and P(x̄ > 54). 10 marks
The central limit theorem (CLT) explains why the normal distribution can be used for sample means even when the population itself is not normal.
Statement (without proof): if x̄ is the mean of a random sample of size n drawn from any population with mean μ and finite variance σ², then as n → ∞ the distribution of Z = (x̄ − μ)/(σ/√n) approaches the standard normal distribution N(0, 1). So, for large n, x̄ is approximately normal with mean μ and standard error σ/√n.
Importance:
- The shape of the population does not matter; only μ and σ are needed.
- In practice n ≥ 30 is taken as large enough.
- If the population is itself normal, x̄ is exactly normal for every n.
- It justifies the large-sample confidence interval x̄ ± z(α/2)·σ/√n and the large-sample tests.
Problem: μ = 50, σ = 12, n = 36. The shape of the population is not given, but n = 36 ≥ 30, so by the CLT x̄ is approximately normal.
Step 1. Standard error: σ/√n = 12/√36 = 12/6 = 2. So x̄ is approximately normal with mean 50 and SE 2, and we standardise with z = (x̄ − 50)/2.
Step 2. P(48 < x̄ < 53).
- At x̄ = 48: z = (48 − 50)/2 = −1.
- At x̄ = 53: z = (53 − 50)/2 = 1.5.
- P(−1 < Z < 1.5) = P(0 < Z < 1) + P(0 < Z < 1.5) = 0.3413 + 0.4332 = 0.7745.
Step 3. P(x̄ > 54).
- z = (54 − 50)/2 = 2.
- P(Z > 2) = 0.5 − P(0 < Z < 2) = 0.5 − 0.4772 = 0.0228.
Conclusion: about 77.45% of random samples of 36 have a mean between 48 and 53, and only about 2.28% have a mean above 54. Without the CLT these probabilities could not be found, because the population distribution is unknown.
4 A random sample of 100 items has mean 72.4, and the population standard deviation is 8. Find the maximum error of estimate and the confidence interval for μ at 95% and 99% confidence. How large a sample is needed for the maximum error at 95% to be at most 1.2? 10 marks
When the sample is large (n ≥ 30), or the population is normal with known σ, x̄ is normal (at least approximately) with standard error σ/√n, so P(|x̄ − μ| < z(α/2)·σ/√n) = 1 − α. For a large sample, s may replace an unknown σ.
Formulas:
- Maximum error of estimate: E = z(α/2)·σ/√n.
- Confidence interval: x̄ − E < μ < x̄ + E.
- Sample size for a given E: n = (z(α/2)·σ/E)², rounded up.
- Two-tailed values: z(0.025) = 1.96 for 95% and z(0.005) = 2.58 for 99% (2.576 to three decimals).
Given: n = 100, x̄ = 72.4, σ = 8.
Step 1. Standard error: σ/√n = 8/√100 = 8/10 = 0.8.
Step 2. 95% confidence.
- E = 1.96 × 0.8 = 1.568.
- Lower limit = 72.4 − 1.568 = 70.832.
- Upper limit = 72.4 + 1.568 = 73.968.
- 95% interval: 70.832 < μ < 73.968.
Step 3. 99% confidence.
- E = 2.58 × 0.8 = 2.064.
- Lower limit = 72.4 − 2.064 = 70.336.
- Upper limit = 72.4 + 2.064 = 74.464.
- 99% interval: 70.336 < μ < 74.464.
Step 4. Sample size for E ≤ 1.2 at 95%.
- n = (1.96 × 8/1.2)² = (13.0667)² = 170.74.
- Round up: n = 171. Check: 1.96 × 8/√171 = 1.199, which is within 1.2.
Confidence z E Interval
95% 1.96 1.568 70.832 to 73.968
99% 2.58 2.064 70.336 to 74.464Interpretation: if many samples of 100 were drawn and a 95% interval made from each, about 95% of those intervals would contain μ. The 99% interval is wider, because more confidence costs precision. Since n grows as 1/E², halving the maximum error needs four times as many items.
Conclusion: with 95% confidence μ lies between 70.832 and 73.968, the maximum error being 1.568, and a sample of at least 171 items is needed for a maximum error of 1.2.
5 Explain how the t-distribution is used to estimate a population mean from a small sample. A random sample of 10 packets has weights (in grams) 48, 52, 50, 47, 53, 49, 51, 54, 46, 50. Find the maximum error of estimate and the 95% and 99% confidence intervals for the mean weight. 10 marks
When the population is normal, σ is unknown and the sample is small (n < 30), s/√n replaces σ/√n and the normal table is no longer accurate. The statistic t = (x̄ − μ)/(s/√n), with s² = Σ(x − x̄)²/(n − 1), follows Student's t-distribution with ν = n − 1 degrees of freedom. The t curve is symmetric about 0 like the normal curve but has heavier tails, and it approaches the normal curve as ν grows.
Formulas:
- Maximum error of estimate: E = t(α/2)·s/√n, with t(α/2) read for n − 1 degrees of freedom.
- Confidence interval: x̄ − E < μ < x̄ + E.
Problem: a random sample of 10 packets from a normal population has weights (in grams) 48, 52, 50, 47, 53, 49, 51, 54, 46, 50.
Step 1. Mean: Σx = 500, so x̄ = 500/10 = 50.
Step 2. Working table:
x x - 50 (x - 50)²
48 -2 4
52 2 4
50 0 0
47 -3 9
53 3 9
49 -1 1
51 1 1
54 4 16
46 -4 16
50 0 0
Total 0 60Step 3. s² = 60/(10 − 1) = 6.667 and s = 2.582 (divisor n − 1).
Step 4. Standard error: s/√n = 2.582/√10 = 2.582/3.162 = 0.8165.
Step 5. Degrees of freedom ν = 10 − 1 = 9. From the t table: t(0.025) = 2.262 for 95% and t(0.005) = 3.250 for 99% (two-tailed).
Step 6. 95% interval.
- E = t × SE = 2.262 × 0.8165 = 1.847.
- 50 − 1.847 < μ < 50 + 1.847, so 48.153 < μ < 51.847.
Step 7. 99% interval.
- E = 3.250 × 0.8165 = 2.654.
- 47.346 < μ < 52.654.
Using the normal value 1.96 by mistake would give E = 1.96 × 0.8165 = 1.600, which is too small: the larger t value widens the interval to allow for the extra uncertainty in s.
Conclusion: with 95% confidence the mean weight lies between 48.153 g and 51.847 g, with maximum error of estimate 1.847 g; at 99% the interval widens to 47.346 g to 52.654 g.
6 Explain how the chi-square and F distributions are used in estimation. Two independent random samples from normal populations give n₁ = 10, s₁² = 24 and n₂ = 8, s₂² = 12 (divisor n − 1). Find 95% confidence intervals for σ₁² and for σ₁²/σ₂². 10 marks
The t-distribution estimates a mean when σ is unknown. To estimate a variance, or to compare two variances, the chi-square and F distributions are used. Both assume samples from normal populations, with s² = Σ(x − x̄)²/(n − 1).
1. Chi-square: χ² = (n − 1)s²/σ² follows the chi-square distribution with n − 1 degrees of freedom (df). Its curve takes only positive values and is skewed to the right, so the two table points are not symmetric. Let χ²(α/2) and χ²(1 − α/2) be the points with upper-tail areas α/2 and 1 − α/2. The 100(1 − α)% interval for the parameter σ² is (n − 1)s²/χ²(α/2) < σ² < (n − 1)s²/χ²(1 − α/2).
2. F: F = (s₁²/σ₁²)/(s₂²/σ₂²) follows the F distribution with (ν₁, ν₂) = (n₁ − 1, n₂ − 1) df. Let F(ν₁, ν₂) be its upper α/2 point; the lower point equals 1/F(ν₂, ν₁). The interval for the ratio of variances is (s₁²/s₂²)/F(ν₁, ν₂) < σ₁²/σ₂² < (s₁²/s₂²)·F(ν₂, ν₁).
Problem: two independent random samples from normal populations give n₁ = 10, s₁² = 24 and n₂ = 8, s₂² = 12 (divisor n − 1). Find 95% intervals for σ₁² and σ₁²/σ₂².
Part (i): interval for σ₁².
- df = 10 − 1 = 9 and (n₁ − 1)s₁² = 9 × 24 = 216.
- Chi-square table, 9 df: χ²(0.025) = 19.023 and χ²(0.975) = 2.700.
- Lower limit = 216/19.023 = 11.355.
- Upper limit = 216/2.700 = 80.0.
- So 11.355 < σ₁² < 80.0, and taking square roots, 3.370 < σ₁ < 8.944.
Part (ii): interval for σ₁²/σ₂².
- s₁²/s₂² = 24/12 = 2, with ν₁ = 9 and ν₂ = 7.
- Upper 2.5% points of F: F(9, 7) = 4.82 and F(7, 9) = 4.20.
- Lower limit = 2/4.82 = 0.415.
- Upper limit = 2 × 4.20 = 8.40.
- So 0.415 < σ₁²/σ₂² < 8.40.
Results (variance = σ₁², ratio = σ₁²/σ₂²):
Target Table values Limits
Variance 19.023, 2.700 11.355, 80.0
Ratio 4.82, 4.20 0.415, 8.40Since the interval for the ratio contains 1, these data do not show that the two variances differ at the 5% level. Both intervals are wide because the samples are small.
Conclusion: z (σ known or n ≥ 30) and t (small sample, σ unknown) estimate a mean, chi-square estimates a single variance with n − 1 df, and F estimates a ratio of two variances with (n₁ − 1, n₂ − 1) df.
Tests of Hypothesis
Syllabus: Null and alternative hypotheses; Type I and Type II errors; Level of significance, and one-tailed and two-tailed tests; Large-sample tests for a single mean and a difference of means; Large-sample tests for a single proportion and two proportions; Small-sample tests: Student's t-test; The F-test; The chi-square test
One-page revision summary
- A test of hypothesis uses a random sample to decide whether the null hypothesis H0 about a population parameter should be rejected in favour of the alternative hypothesis H1.
- H0 is a hypothesis of no difference, such as μ = μ0, while H1 is two-sided (≠) or one-sided (> or <).
- Accepting H0 means only that the sample gives no evidence against it at the chosen level, not that H0 is proved.
- A Type I error rejects a true H0 with probability α, and a Type II error accepts a false H0 with probability β; the power of the test is 1 − β.
- For a fixed sample size, lowering α raises β, and a larger sample is the way to reduce both together.
- The level of significance α, usually 5% or 1%, fixes the size of the critical region in which H0 is rejected.
- A two-tailed test splits the critical region between both tails, while a one-tailed test puts all of it in the tail named by H1.
- The critical values of z are 1.96 and 2.58 for two-tailed tests and 1.645 and 2.33 for one-tailed tests, at the 5% and 1% levels.
- Large-sample tests (n ≥ 30) use z = (statistic − parameter)/standard error, with sample standard deviations in place of unknown σ.
- For a single proportion the standard error √(PQ/n) uses the hypothesised P, and for two proportions it uses the pooled estimate P̂ = (x1 + x2)/(n1 + n2).
- Student's t-test is used for small samples from normal populations with σ unknown, with n − 1 degrees of freedom for one mean and n1 + n2 − 2 for two means.
- The pooled t-test for two means assumes equal population variances, which is checked first with the F-test.
- The F-test uses F = S1²/S2², with the larger estimate in the numerator and (n1 − 1, n2 − 1) degrees of freedom.
- The chi-square statistic Σ(O − E)²/E tests goodness of fit and independence of attributes, and it is a right-tailed test.
- In an r × c contingency table, E = (row total × column total)/N and there are (r − 1)(c − 1) degrees of freedom.
- Every expected frequency should be at least 5, so smaller classes are pooled before the chi-square test is applied.
Learn these by heart
- Large samples: z = (x̄ − μ)/(σ/√n) for one mean and z = (x̄1 − x̄2)/√(σ1²/n1 + σ2²/n2) for two means.
- Proportions: z = (p − P)/√(PQ/n) for one, and z = (p1 − p2)/√(P̂Q̂(1/n1 + 1/n2)) with P̂ = (x1 + x2)/(n1 + n2) for two.
- One-sample t = (x̄ − μ)/(S/√n), with S² = Σ(x − x̄)²/(n − 1) and n − 1 degrees of freedom.
- Two-sample t = (x̄1 − x̄2)/(S√(1/n1 + 1/n2)), with pooled S² = [Σ(x − x̄)² + Σ(y − ȳ)²]/(n1 + n2 − 2) and n1 + n2 − 2 degrees of freedom.
- F = S1²/S2² with S1² ≥ S2², and (n1 − 1, n2 − 1) degrees of freedom.
- χ² = Σ(O − E)²/E, with k − 1 − m degrees of freedom for goodness of fit and (r − 1)(c − 1) for independence.
- α = P(reject H0 | H0 true), β = P(accept H0 | H0 false), and power = 1 − β.
2-mark questions
1 Define the null hypothesis and the alternative hypothesis, with an example. 2 marks
The null hypothesis H0 is the hypothesis of no difference that is tested; it is assumed true until the sample gives strong evidence against it, for example H0: μ = 50.
The alternative hypothesis H1 is the hypothesis accepted when H0 is rejected, for example H1: μ ≠ 50 (two-tailed), or H1: μ > 50 or μ < 50 (one-tailed).
2 What are Type I and Type II errors in testing a hypothesis? 2 marks
A Type I error is rejecting H0 when H0 is true; its probability α = P(reject H0 | H0 true) is the level of significance.
A Type II error is accepting H0 when H0 is false; its probability is β = P(accept H0 | H0 false). The power of the test is 1 − β.
3 Define the level of significance and the critical region. State the 5% critical values of z for one-tailed and two-tailed tests. 2 marks
The level of significance α is the probability of a Type I error that we allow, usually 5% or 1%. The critical region is the set of values of the test statistic for which H0 is rejected.
At 5%, H0 is rejected when |z| > 1.96 (two-tailed), z > 1.645 (right-tailed) or z < −1.645 (left-tailed).
4 A coin is tossed 400 times and shows 216 heads. Test at the 5% level whether the coin is unbiased. 2 marks
H0: P = 1/2; H1: P ≠ 1/2 (two-tailed, α = 0.05). Sample proportion p = 216/400 = 0.54. Standard error = √(PQ/n) = √(0.5 × 0.5/400) = 0.025. z = (p − P)/SE = (0.54 − 0.5)/0.025 = 1.6. Since |z| = 1.6 < 1.96, H0 is accepted: the coin may be taken as unbiased.
5 State the F-statistic used to test the equality of two population variances. 2 marks
For independent samples of sizes n1 and n2 from normal populations, S1² = Σ(x − x̄)²/(n1 − 1) and S2² = Σ(y − ȳ)²/(n2 − 1). With S1² the larger, F = S1²/S2² follows the F-distribution with (n1 − 1, n2 − 1) degrees of freedom under H0: σ1² = σ2²; H0 is rejected if F exceeds the table value.
6 State the conditions for applying the chi-square test. 2 marks
- The observations are independent and drawn at random.
- The total frequency N is reasonably large, at least 50.
- Every expected frequency is at least 5; smaller classes are pooled with neighbouring classes before the degrees of freedom are counted.
- The constraints on the cell frequencies are linear, such as ΣO = ΣE.
10-mark questions
1 Explain the procedure for testing a statistical hypothesis. Define the null hypothesis, alternative hypothesis, level of significance, critical region, and one-tailed and two-tailed tests. 10 marks
A statistical hypothesis is an assumption about a population parameter, such as a mean μ, a proportion P or a variance σ². A test of hypothesis uses a random sample to decide whether the sample is consistent with the assumption or contradicts it.
Basic terms:
- Null hypothesis H0: the hypothesis of no difference that is tested, for example H0: μ = 50. It is assumed true until the sample gives strong evidence against it.
- Alternative hypothesis H1: the hypothesis accepted when H0 is rejected, for example H1: μ ≠ 50, μ > 50 or μ < 50.
- Level of significance α: the probability of rejecting a true H0 (a Type I error) that we allow, usually 5% or 1%.
- Critical region: the set of values of the test statistic for which H0 is rejected; the rest is the acceptance region, and the boundary values are the critical values.
- Two-tailed test: H1 uses ≠, so the critical region is split equally between both tails of the sampling distribution.
- One-tailed test: H1 uses > (right-tailed) or < (left-tailed), so the whole critical region lies in one tail.
Critical values of z for the normal distribution:
Level Two-tail Right-tail Left-tail
5% |z|>1.96 z>1.645 z<-1.645
1% |z|>2.58 z>2.33 z<-2.33Procedure:
1. State the null hypothesis H0.
2. State the alternative hypothesis H1; it decides whether the test is one-tailed or two-tailed.
3. Choose the level of significance α.
4. Choose the test statistic: z for large samples (n ≥ 30), t for small samples from a normal population with σ unknown, F for comparing two variances, and chi-square for frequencies.
5. Find the critical region from tables, using α, the tail and, for t, F and chi-square, the degrees of freedom.
6. Compute the test statistic from the sample, for example z = (x̄ − μ)/(σ/√n).
7. Decide: if the computed value lies in the critical region, reject H0 and accept H1; otherwise accept H0, which means only that the sample gives no reason to reject it.
Example: to test H0: μ = 50 against H1: μ ≠ 50 at the 5% level, the test is two-tailed and H0 is rejected if |z| > 1.96. Against H1: μ > 50 it is right-tailed and H0 is rejected if z > 1.645.
Conclusion: a test never proves H0. It tells us whether the sample is consistent with H0 at the chosen level of significance, so α and the tail must be fixed before the sample is examined.
2 Explain Type I and Type II errors and the power of a test. A coin is tossed 8 times to test H0: p = 1/2 against H1: p > 1/2, and H0 is rejected if 7 or more heads appear. Find the probabilities of both errors when the true value is p = 0.7. 10 marks
A test of hypothesis decides from a sample, so its decision can be wrong. There are four possible outcomes, depending on whether H0 is actually true and on what we decide:
Decision H0 true H0 false
Reject H0 Type I error Correct
Accept H0 Correct Type II errorDefinitions:
- Type I error: rejecting H0 when it is true. α = P(reject H0 | H0 true), which is the level of significance. In quality control it is called the producer's risk.
- Type II error: accepting H0 when it is false. β = P(accept H0 | H0 false), called the consumer's risk.
- Power of the test: 1 − β = P(reject H0 | H0 false), the chance of detecting a false H0.
Worked example. Let X be the number of heads in 8 tosses, so X is binomial with n = 8. The test of H0: p = 1/2 against H1: p > 1/2 is right-tailed, and the critical region is X ≥ 7.
1. α = P(X ≥ 7 | p = 1/2) = [C(8,7) + C(8,8)]/2⁸ = (8 + 1)/256 = 9/256 = 0.0352.
2. When p = 0.7: P(X = 7) = 8(0.7)⁷(0.3) = 0.1977 and P(X = 8) = (0.7)⁸ = 0.0576.
3. Power = P(X ≥ 7 | p = 0.7) = 0.1977 + 0.0576 = 0.2553.
4. β = P(X ≤ 6 | p = 0.7) = 1 − 0.2553 = 0.7447.
So this test rarely rejects a fair coin (3.5% of the time), but it fails to detect a coin with p = 0.7 about 74% of the time.
Trade-off: if the critical region is widened to X ≥ 6, then α = (28 + 8 + 1)/256 = 37/256 = 0.1445, while β falls to 0.4482 and the power rises to 0.5518. For a fixed sample size, reducing α increases β, and the reverse. The way to reduce both together is to take a larger sample.
Conclusion: in practice α is fixed in advance (5% or 1%), because a Type I error is usually treated as the more serious one, and among tests with that α the one with the smallest β, that is the greatest power, is preferred.
3 Explain the large-sample tests for a single mean and for the difference of two means. (a) A sample of 64 items has mean 51.6, and the population standard deviation is 6; test at the 5% level whether the population mean is 50. (b) Two independent samples gave n1 = 50, x̄1 = 68.4, s1 = 5 and n2 = 60, x̄2 = 66.2, s2 = 6; test at the 5% level whether the population means differ. 10 marks
For large samples (n ≥ 30) the sample mean is approximately normal by the central limit theorem, so z = (statistic − parameter)/(standard error) is treated as a standard normal variate. When a population standard deviation σ is unknown, the sample standard deviation s is used in its place.
Formulas:
- Single mean: H0: μ = μ0, z = (x̄ − μ0)/(σ/√n).
- Difference of means: H0: μ1 = μ2, z = (x̄1 − x̄2)/√(σ1²/n1 + σ2²/n2), with s1 and s2 in place of σ1 and σ2 when these are unknown.
- Two-tailed test at the 5% level: reject H0 if |z| > 1.96.
(a) Single mean
1. H0: μ = 50; H1: μ ≠ 50 (two-tailed); α = 0.05.
2. Standard error = σ/√n = 6/√64 = 6/8 = 0.75.
3. z = (51.6 − 50)/0.75 = 1.6/0.75 = 2.13.
4. |z| = 2.13 > 1.96, so H0 is rejected at the 5% level: the population mean differs from 50.
(b) Difference of means
1. H0: μ1 = μ2; H1: μ1 ≠ μ2 (two-tailed); α = 0.05.
2. Both samples are large, so s1 and s2 replace σ1 and σ2.
3. Standard error = √(s1²/n1 + s2²/n2) = √(25/50 + 36/60) = √(0.5 + 0.6) = √1.1 = 1.0488.
4. z = (68.4 − 66.2)/1.0488 = 2.2/1.0488 = 2.10.
5. |z| = 2.10 exceeds the critical value 1.96, so H0 is rejected at the 5% level: the two population means differ.
At the 1% level the two-tailed critical value is 2.58. Since 2.10 < 2.58, H0 in part (b) would be accepted there, so the decision depends on the level of significance, which must be fixed before the data are examined.
Conclusion: both large-sample tests follow the same pattern: state H0 and H1, find the standard error, compute z, and compare |z| with the critical value for the chosen level and tail.
4 Explain the large-sample tests for a single proportion and for two proportions. (a) A machine is claimed to produce not more than 10% defective items; a sample of 500 items has 65 defectives. Test the claim at the 5% level. (b) Two machines gave 36 defectives in a sample of 400 and 30 defectives in a sample of 500. Test at the 5% level whether the proportions of defectives differ. 10 marks
In a large sample of size n, the number of successes is binomial, and the sample proportion p is approximately normal with mean P and standard error √(PQ/n), where Q = 1 − P. Proportions are therefore tested with a z statistic.
Formulas:
- Single proportion: H0: P = P0, z = (p − P0)/√(P0Q0/n). The standard error uses the hypothesised P0, not the sample p.
- Two proportions: H0: P1 = P2. The common P is unknown, so it is estimated by pooling the samples: P̂ = (x1 + x2)/(n1 + n2), Q̂ = 1 − P̂, and z = (p1 − p2)/√(P̂Q̂(1/n1 + 1/n2)).
(a) Single proportion
1. H0: P = 0.10; H1: P > 0.10. The claim is "not more than 10%", so the test is right-tailed; α = 0.05 and the critical value is 1.645.
2. p = 65/500 = 0.13.
3. Standard error = √(0.10 × 0.90/500) = √0.00018 = 0.01342.
4. z = (0.13 − 0.10)/0.01342 = 2.24.
5. z = 2.24 > 1.645, so H0 is rejected at the 5% level: the sample does not support the claim, and the proportion of defectives appears to exceed 10%.
(b) Two proportions
1. H0: P1 = P2; H1: P1 ≠ P2 (two-tailed); α = 0.05 and the critical value is 1.96.
2. p1 = 36/400 = 0.09 and p2 = 30/500 = 0.06.
3. Pooled P̂ = (36 + 30)/(400 + 500) = 66/900 = 0.0733, Q̂ = 834/900 = 0.9267, and P̂Q̂ = 0.067956.
4. 1/n1 + 1/n2 = 1/400 + 1/500 = 0.0045, so the standard error = √(0.067956 × 0.0045) = √0.0003058 = 0.01749.
5. z = (0.09 − 0.06)/0.01749 = 0.03/0.01749 = 1.72.
6. |z| = 1.72 < 1.96, so H0 is accepted: the difference between the two machines is not significant at the 5% level.
Conclusion: a one-sided claim such as "not more than" leads to a one-tailed test with critical value 1.645 at 5%, while a question of whether two proportions differ leads to a two-tailed test with critical value 1.96. In both cases the decision compares the computed z with the critical value.
5 Explain Student's t-test and the F-test. Two independent samples from normal populations gave A: 12, 14, 10, 15, 13, 16, 11, 13 and B: 15, 17, 14, 18, 16, 19, 13. Test at the 5% level (a) whether the population variances are equal and (b) whether the population means are equal. 10 marks
When a sample is small (n < 30) and σ is unknown, z cannot be used. If the population is normal, t = (x̄ − μ)/(S/√n), where S² = Σ(x − x̄)²/(n − 1), follows Student's t-distribution with n − 1 degrees of freedom. Two means are compared with a pooled t-test, which assumes equal population variances; that assumption is checked first with the F-test, F = (larger variance estimate)/(smaller variance estimate). All variances here divide by n − 1.
Let x be the values of A (n1 = 8) and y the values of B (n2 = 7). The last line of the working table gives the column totals, so x̄ = 104/8 = 13 and ȳ = 112/7 = 16.
x x-13 sq y y-16 sq
12 -1 1 15 -1 1
14 1 1 17 1 1
10 -3 9 14 -2 4
15 2 4 18 2 4
13 0 0 16 0 0
16 3 9 19 3 9
11 -2 4 13 -3 9
13 0 0
104 0 28 112 0 28(a) F-test
1. H0: σ1² = σ2²; H1: σ1² ≠ σ2².
2. S1² = 28/7 = 4.000 and S2² = 28/6 = 4.667.
3. S2² is the larger, so F = S2²/S1² = 4.667/4.000 = 1.17, with (n2 − 1, n1 − 1) = (6, 7) degrees of freedom (df).
4. H1 is two-sided and the larger estimate is in the numerator, so the 5% critical value is the upper 2.5% point, F0.025(6, 7) = 5.12. Most F tables give the upper 5% point, F0.05(6, 7) = 3.87, and many answers compare F with it; strictly, with the larger estimate on top, that comparison is a two-sided test at the 10% level. Since 1.17 is below both, H0 is accepted: the variances may be taken as equal.
(b) t-test
1. H0: μ1 = μ2; H1: μ1 ≠ μ2 (two-tailed); α = 0.05.
2. Pooled S² = (28 + 28)/(8 + 7 − 2) = 56/13 = 4.3077, so S = 2.0755.
3. t = (ȳ − x̄)/(S√(1/n1 + 1/n2)) = 3/(2.0755 × 0.5175) = 3/1.0742 = 2.79.
4. Degrees of freedom (df) = n1 + n2 − 2 = 13, and the two-tailed 5% value is t0.05 = 2.160.
5. |t| = 2.79 exceeds 2.160, so H0 is rejected: the population means differ significantly.
Conclusion: the samples are consistent with a common variance, which justifies pooling, and the pooled t-test then shows that the population means differ at the 5% level.
6 Explain the chi-square test of independence of attributes. Items from two machines were classified by quality as A: Good 50, Fair 30, Poor 20 and B: Good 35, Fair 25, Poor 40. Test at the 5% level whether quality is independent of the machine. 10 marks
The chi-square (χ²) test compares observed frequencies O with the expected frequencies E calculated under H0, using χ² = Σ(O − E)²/E. A small value means the observations agree with H0 and a large value is evidence against it, so the test is right-tailed. It is used for goodness of fit, with k − 1 − m degrees of freedom for k classes and m parameters estimated from the data, and for independence of attributes in an r × c contingency table, with (r − 1)(c − 1) degrees of freedom. Every expected frequency should be at least 5.
Observed frequencies:
Machine Good Fair Poor Total
A 50 30 20 100
B 35 25 40 100
Total 85 55 60 2001. H0: quality is independent of the machine; H1: quality depends on the machine. α = 0.05, right-tailed.
2. Expected frequency of a cell = (row total × column total)/N. For A and Good, E = 100 × 85/200 = 42.5. Similarly E = 27.5 for Fair and 30 for Poor, and B has the same three values because both row totals are 100. Every E is at least 5.
3. The working table gives each term (O − E)²/E:
Cell O E O-E (O-E)²/E
A Good 50 42.5 7.5 1.3235
A Fair 30 27.5 2.5 0.2273
A Poor 20 30.0 -10.0 3.3333
B Good 35 42.5 -7.5 1.3235
B Fair 25 27.5 -2.5 0.2273
B Poor 40 30.0 10.0 3.3333
Total 200 200.0 0.0 9.76824. χ² = 9.768.
5. Degrees of freedom (df) = (2 − 1)(3 − 1) = 2, and the table value for 2 degrees of freedom at the 5% level is χ²0.05 = 5.991.
6. Since χ² = 9.768 exceeds 5.991, H0 is rejected at the 5% level: quality is not independent of the machine. Machine B gives more Poor items, and fewer Good items, than independence would give.
Conclusion: the chi-square test needs only frequencies, not a normal population, which makes it the natural test for classified data; the decision depends on the degrees of freedom as well as on α.
Public sources that settled doubtful points
Only the points the second AI pass doubted were looked up. These are the pages that confirmed or contradicted them; nothing here is copied from them.
30 pages
- Kurtosis - Wikipedia
- Continuous uniform distribution - Wikipedia
- NIST/SEMATECH e-Handbook: F-Test for Equality of Two Variances
- NIST/SEMATECH e-Handbook: Upper Critical Values of the F Distribution
- Skewness - Wikipedia
- Central moment - Wikipedia
- Nonparametric skew - Wikipedia
- Histogram - Wikipedia
- Bessel's correction - Wikipedia
- Coefficient of variation - Wikipedia
- Spearman's rank correlation coefficient - Wikipedia
- Rank correlation (lecture script) - Consortium for Educational Communication
- Covariance and Correlation - Kellogg School of Management course notes
- Probability axioms - Wikipedia
- Law of total probability - Wikipedia
- Poisson limit theorem - Wikipedia
- Normal distribution - Wikipedia
- NIST/SEMATECH e-Handbook: Cumulative Distribution Function of the Standard Normal Distribution
- NIST/SEMATECH e-Handbook: Critical values of the Student's t distribution
- NIST/SEMATECH e-Handbook: Critical values of the chi-square distribution
- NIST/SEMATECH e-Handbook: Chi-square test for the standard deviation
- F-distribution (Wikipedia)
- Central limit theorem (Wikipedia)
- NIST/SEMATECH e-Handbook: Sample sizes required
- Efficiency (statistics) (Wikipedia)
- Consistent estimator (Wikipedia)
- NIST/SEMATECH e-Handbook: Two-Sample t-Test for Equal Means
- OpenStax Introductory Business Statistics: 11.4 Test of Independence
- Wikipedia: Power of a test
- OpenStax Introductory Statistics 2e: 9.2 Outcomes and the Type I and Type II Errors
Further reading
Titles only, for your own study. Nothing on this page is copied from them. The units follow the official JNTUK R23 CSE syllabus (PDF) ↗.
- Miller and Freund's Probability and Statistics for Engineers · Richard A. Johnson
- Fundamentals of Mathematical Statistics · S. C. Gupta and V. K. Kapoor
- Probability and Statistics for Engineers and Scientists · Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers and Keying Ye
- Probability and Statistics for Engineering and the Sciences · Jay L. Devore
- Introduction to Probability and Statistics for Engineers and Scientists · Sheldon M. Ross
- Applied Statistics for Engineers and Physical Scientists · Johannes Ledolter and Robert V. Hogg