Course Overview
This course provides a comprehensive foundation in probability theory and statistical methods. Students will study probability distributions, statistical inference, hypothesis testing, and experimental design. The course emphasizes both theoretical understanding and practical application of statistical techniques for data analysis and decision-making in computing and business contexts. Building on descriptive statistics, the course introduces probabilistic models for uncertainty and moves toward inferential statistics that allow students to make conclusions about populations from sample data.
Learning Outcomes
Upon completion of this course, students will be able to:
- Apply basic probability theory to model and solve problems involving uncertainty
- Describe and characterize data using descriptive statistics
- Perform correlation and regression analysis to examine relationships between variables
- Apply probability distributions (binomial, Poisson, normal) to real-world problems
- Design and conduct sample surveys and experiments
- Select and apply appropriate sampling methods for research studies
- Perform design of experiments (ANOVA) to compare multiple treatments
- Interpret statistical results and make data-driven decisions
- Use statistical software or calculators for data analysis
- Communicate statistical findings effectively to technical and non-technical audiences
Unit 1: Introduction to Statistics
Teaching Hours: 3
Meaning: Statistics is the science of collecting, organizing, analyzing, interpreting, and presenting data. It provides methods for making sense of data and drawing meaningful conclusions. Unlike pure mathematics, statistics deals with uncertainty and variability in real-world data, making it essential for computing, business, and scientific decision-making.
Scope and Limitations of Statistics:
- Scope: Used in diverse fields (business, economics, medicine, engineering, social sciences, computer science). Enables data-driven decision making, trend analysis, forecasting, and quality control.
- Limitations: Statistics deals with aggregates, not individuals; results are true on average, not for every case; statistical methods require proper data collection and appropriate model selection; conclusions are probabilistic, not deterministic.
Types and Sources of Data:
-
Types of Data:
- Qualitative (Attribute): Descriptive data (names, labels, categories). Example: Gender, color, software type.
- Quantitative: Numerical data that can be measured.
- Discrete: Countable values (number of students, defects in a program).
- Continuous: Measurable values (height, weight, temperature, execution time).
-
Sources of Data:
- Primary Data: Collected firsthand for specific purpose. Methods: surveys, experiments, observations, interviews.
- Secondary Data: Already collected by others. Examples: census reports, government publications, existing research datasets, journal archives.
Methods and Problems of Collection of Primary and Secondary Data:
-
Primary Data Collection Methods:
- Direct Personal Investigation: Interviewer collects data directly from respondents.
- Indirect Oral Investigation: Information from third parties who have knowledge about the respondent.
- Through Questionnaires: Written questions sent to respondents to answer.
- Through Telephone: Telephonic interviews for data collection.
- Through Observation: Observer records behavior or events systematically.
-
Problems in Data Collection:
- Sampling Errors: Errors due to observing a sample instead of the entire population.
- Non-Sampling Errors: Errors from data processing, non-response, bias.
- Response Bias: Respondents may not answer truthfully or may give socially desirable answers.
- Coverage Error: Some population members are excluded from the sampling frame.
- Frame Error: Sampling frame does not accurately represent the target population.
Key Terms
- Statistics, Descriptive, Inferential, Population, Sample, Primary Data, Secondary Data, Quantitative, Qualitative, Discrete, Continuous, Sampling Error, Bias, Parameter, Statistic, Census
Unit Summary
Statistics provides the methodology for collecting, analyzing, and interpreting data. Understanding the scope, limitations, and proper data collection methods is fundamental for valid statistical analysis and informed decision-making. The distinction between primary and secondary data, and between probability and non-probability sampling, determines the reliability of statistical conclusions.
Practice Questions
Q1. What is the main limitation of statistics? (Answer: Statistics deals with aggregates and collections of data, not individual observations.)
Q2. Differentiate between primary and secondary data. (Answer: Primary data is collected firsthand for specific purpose; secondary data already exists and was collected by others.)
Q3. What are the main types of sampling errors? (Answer: Sampling error from observing sample instead of population; non-sampling errors from data processing, non-response, bias.)
Q3.1. (Alternative) What are the methods of collecting primary data? (Answer: Personal investigation, indirect oral investigation, questionnaires, telephone, observation.)
Q4. What is response bias and how can it be minimized? (Answer: Response bias occurs when respondents don't answer truthfully; can be minimized through anonymous surveys, careful question design.)
Q5. Explain the difference between discrete and continuous data with examples. (Answer: Discrete: countable (number of students); Continuous: measurable (height, weight).)
Q6. Explain how statistics can be misused. (Answer: Misleading graphs, cherry-picking data, ignoring sample size, correlation vs. causation.)
Q7. Write a short note on the importance of pilot testing a survey questionnaire. (Answer: Provided in solution section.)
Unit 2: Descriptive Statistics
Teaching Hours: 6
Measure of Central Tendency: Measures that identify the "center" or typical value of a dataset.
-
Arithmetic Mean: Sum of all values divided by number of values.
- Formula: $\bar{x} = \frac{\sum x_i}{n}$
- For grouped data: $\bar{x} = \frac{\sum f_i x_i}{\sum f_i}$ where $f_i$ is frequency and $x_i$ is the midpoint of each class.
-
Median: Middle value when data is arranged in ascending order.
- For odd $n$: middle value
- For even $n$: average of two middle values
- For grouped data: $Median = L + \left(\frac{\frac{n}{2} - F}{f}\right) \times h$ where $L$ is lower boundary of median class, $F$ is cumulative frequency before median class, $f$ is frequency of median class, $h$ is class width.
-
Partition Values: Quartiles, deciles, percentiles dividing data into equal parts.
- $Q1$ (25th percentile), $Q2$ (50th percentile = median), $Q3$ (75th percentile)
- For grouped data, similar formula to median applies for each quartile.
-
Mode: Most frequently occurring value in the dataset.
- A dataset can have no mode, one mode (unimodal), or multiple modes (bimodal, multimodal).
- For grouped data: $Mode = L + \left(\frac{f_m - f_1}{2f_m - f_1 - f_2}\right) \times h$ where $f_m$ is modal class frequency, $f_1$ is frequency before modal class, $f_2$ is frequency after modal class.
Measure of Dispersion: Measures that describe the spread or variability of a dataset.
-
Absolute Measures: Based on original units of data.
- Range: Difference between maximum and minimum values. $Range = Max - Min$.
- Quartile Deviation (QD): Also called semi-interquartile range = (Q3 - Q1) / 2.
- Mean Deviation: Average of absolute deviations from mean/median/mode.
- Mean Deviation about Mean: $\frac{\sum |x_i - \bar{x}|}{n}$
- Mean Deviation about Median: $\frac{\sum |x_i - \text{Median}|}{n}$
- Mean Deviation about Mode: $\frac{\sum |x_i - \text{Mode}|}{n}$
-
Relative Measures (Coefficients): Independent of units, expressed as ratios or percentages.
- Coefficient of Range: (Max - Min) / (Max + Min)
- Coefficient of Quartile Deviation: $\frac{Q3 - Q1}{Q3 + Q1}$ where QD = $\frac{Q3 - Q1}{2}$
- Coefficient of Mean Deviation: Mean Deviation / Mean (or Median/Mode)
- Standard Deviation and Coefficient of Variation: Most widely used measures of dispersion.
Standard Deviation:
- Definition: Square root of the average of squared deviations from the mean.
- Formula (for sample): $s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}$
- Formula (for population): $\sigma = \sqrt{\frac{\sum (x_i - \mu)^2}{n}}$
- Properties: Based on all observations, sensitive to extreme values (outliers), mathematically tractable.
Coefficient of Variation:
- Definition: Relative measure of dispersion expressed as percentage.
- Formula: $CV = \frac{s}{\bar{x}} \times 100%$
- Usage: Comparing variability between datasets with different units or means. A CV of 15% means the standard deviation is 15% of the mean.
Key Terms
- Mean, Median, Mode, Central Tendency, Range, Dispersion, Standard Deviation, Variance, Coefficient of Variation, Quartile, Percentile, Decile, Skewness, Kurtosis
Unit Summary
Descriptive statistics summarize and organize data features. Measures of central tendency identify the "center" of a dataset, while measures of dispersion describe the spread or variability. The coefficient of variation enables comparison across different datasets with different units or means. Together, these measures provide a complete picture of data distribution.
Practice Questions
Q1. What is the formula for arithmetic mean of ungrouped data? (Answer: $\bar{x} = \frac{\sum x_i}{n}$)
Q2. The median of the dataset {2, 5, 8, 12, 15} is... (Answer: 8)
Q3. The mode of the dataset {3, 7, 7, 2, 9, 7, 4} is... (Answer: 7)
Q4. Calculate the range of the dataset {4, 9, 15, 2, 11}. (Answer: 15 - 2 = 13)
Q5. Calculate the standard deviation of the dataset {2, 4, 6, 8, 10}. (Answer: Provided in solution section.)
Q6. What is the coefficient of variation and when is it used? (Answer: CV = s/x̄ × 100%; used to compare variability between datasets with different units or means.)
Q7. Compare mean deviation and standard deviation. (Answer: Both measure dispersion; standard deviation uses squared deviations and is more mathematically tractable; mean deviation uses absolute values.)
Q7.1. (Alternative) How does the coefficient of variation enable comparison between datasets? (Answer: It's a relative measure, independent of units, allowing comparison of dispersion across different scales.)
Q8. If the standard deviation of a dataset is 5 and the mean is 20, what is the coefficient of variation? (Answer: 25%)
Q9. The mean deviation about the median is always less than or equal to the mean deviation about the mean. Explain why. (Answer: Median minimizes the sum of absolute deviations, so MAD about median ≤ MAD about mean.)
Q10. An inventory manager wants to compare the variability of two products' monthly sales, one in dollars and one in units. Which measure should they use? (Answer: Coefficient of variation, as it's relative and unit-independent.)
Unit 3: Correlation and Regression Analysis
Teaching Hours: 3
Correlation: Measures the strength and direction of the relationship between two variables.
-
Definition: A measure of the strength and direction of the relationship between two variables. Correlation does not imply causation.
-
Scatter Diagram: Graphical representation of paired data points (x, y).
- Positive correlation: y increases as x increases
- Negative correlation: y decreases as x increases
- No correlation: No discernible pattern
-
Karl Pearson's Coefficient of Correlation:
- Measures linear relationship between two variables
- Formula: $r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}$
- Range: -1 to +1
- Properties:
- Unit-free (dimensionless)
- Independent of change of origin and scale
- $r = 1$: Perfect positive linear relationship
- $r = -1$: Perfect negative linear relationship
- $r = 0$: No linear relationship
- Limit: Measures only linear relationship, not nonlinear
Regression: Models the relationship between a dependent variable (Y) and independent variable(s) (X) for prediction purposes.
- Definition: Modeling the relationship between a dependent variable (Y) and independent variable(s) (X) such that Y can be predicted from X.
- Dependent and Independent Variables: Y is the dependent variable (predicted), X is the independent variable (predictor).
- Least Squares Method Only: Finding the line that minimizes the sum of squared residuals.
- Regression Line of Y on X: $Y = a + bX$
- Slope $b = r \cdot \frac{s_y}{s_x}$
- Intercept $a = \bar{y} - b\bar{x}$
- Regression Line of X on Y: $X = c + dY$
- Slope $d = r \cdot \frac{s_x}{s_y}$
- Intercept $c = \bar{x} - d\bar{y}$
- Regression Line of Y on X: $Y = a + bX$
- Numerical Problems: Calculation problems for determining correlation and regression coefficients.
Key Terms
- Correlation, Regression, Scatter Diagram, Pearson's r, Dependent Variable, Independent Variable, Least Squares, Regression Line, Slope, Intercept, Positive Correlation, Negative Correlation, No Correlation
Unit Summary
Correlation measures the strength of the linear relationship between two variables, while regression models the relationship for prediction purposes. Both are essential tools for understanding associations in data and making forecasts. Crucially, correlation does not imply causation — a high correlation between two variables does not mean one causes the other; there may be a third variable influencing both, or the relationship may be coincidental.
Practice Questions
Q1. What does a correlation coefficient of r = 0.85 indicate? (Answer: Strong positive linear relationship between two variables.)
Q2. Differentiate between correlation and regression. (Answer: Correlation measures strength of relationship; regression models for prediction.)
Q3. Write the formula for Karl Pearson's correlation coefficient. (Answer: $r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}$)
Q4. What is the range of the correlation coefficient? (Answer: -1 to +1)
Q5. Explain the difference between the regression line of Y on X and X on Y. (Answer: Y on X predicts Y from X; X on Y predicts X from Y. Different slopes and intercepts.)
Q6. Given data: mean of X = 10, mean of Y = 15, SD of X = 2, SD of Y = 3, r = 0.8. Find the regression line of Y on X. (Answer: $b = 0.8 \cdot \frac{3}{2} = 1.2$, $a = 15 - 1.2(10) = 3$, so $Y = 1.2X + 3$)
Q7. What is the limitation of correlation coefficient? (Answer: Measures only linear relationship, not nonlinear.)
Q8. Explain the method of least squares. (Answer: Finds the line that minimizes the sum of squared differences between observed and predicted values.)
Q9. The correlation coefficient between two variables is 0, what does it indicate? (Answer: No linear relationship between the variables.)
Q10. The correlation coefficient between height and weight of a group of people is likely to be... (Answer: Positive and high, as taller people tend to weigh more.)
Q11. Can a correlation coefficient of r = 0.95 imply that X causes Y? (Answer: No, correlation does not imply causation. A high correlation may be due to a third variable, reverse causation, or coincidence.)
Q12. Given r = 0.6, s_x = 4, s_y = 5, and $\bar{x} = 10$, $\bar{y} = 12$, find the regression line of X on Y. (Answer: $X - 10 = 0.6 \cdot \frac{4}{5} \cdot (Y - 12)$, i.e., $X = 0.48Y + 4.24$)
Unit 4: Probability
Teaching Hours: 8
Definition of Probability:
- Definition: A measure of the likelihood that an event will occur. Probability quantifies uncertainty and ranges from 0 (impossible) to 1 (certain).
- Two Basic Laws of Probability (without proof):
- Addition Law: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$
- Multiplication Law: $P(A \cap B) = P(A) \cdot P(B|A)$ for dependent events
Two basic Laws of Probability:
-
Addition Law (General): For any two events A and B, $P(A \cup B) = P(A) + P(B) - P(A \cap B)$
- This accounts for the overlap between A and B (intersection), so it's not counted twice.
-
Special Case (Mutually Exclusive): If A and B cannot occur simultaneously, $P(A \cup B) = P(A) + P(B)$
- Since $P(A \cap B) = 0$ for mutually exclusive events, the general formula reduces to this special case.
-
Multiplication Law (General): $P(A \cap B) = P(A) \cdot P(B|A) = P(B) \cdot P(A|B)$
- This gives the probability that both A and B occur, accounting for the conditional probability.
-
Special Case (Independent Events): If A and B are independent, $P(A \cap B) = P(A) \cdot P(B)$
- For independent events, the occurrence of one does not affect the probability of the other, so $P(B|A) = P(B)$.
Conditional Probability:
- Definition: Probability of event A given that event B has occurred.
- Formula: $P(A|B) = \frac{P(A \cap B)}{P(B)}$, where $P(B) > 0$
- Interpretation: The probability of A in the reduced sample space where B has already occurred.
Probability Distributions:
-
Binomial Distribution:
- Definition: Distribution of number of successes in n independent Bernoulli trials.
- Parameters: n (number of trials), p (probability of success).
- Probability Mass Function: $P(X = k) = \binom{n}{k} p^k (1-p)^{n-k}$
- Mean: $np$
- Variance: $np(1-p)$
- Conditions:
- Fixed number of trials (n)
- Two outcomes: "success" and "failure" for each trial
- Constant probability of success (p) for each trial
- Independent trials
-
Poisson Distribution:
- Definition: Distribution of number of events in a fixed interval of time or space.
- Parameter: $\lambda$ (average rate of occurrence)
- Probability Mass Function: $P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}$
- Mean and Variance: Both equal to $\lambda$
- Usage: Rare events over time/space (e.g., accidents, defects, system failures per month)
-
Normal Distribution:
- Definition: Continuous, symmetric, bell-shaped distribution.
- Parameters: $\mu$ (mean), $\sigma$ (standard deviation)
- Probability Density Function: $f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}$
- Standard Normal Distribution: $\mu = 0, \sigma = 1$, denoted as Z
- Empirical Rule: ~68% within 1$\sigma$, ~95% within 2$\sigma$, ~99.7% within 3$\sigma$
- Usage: Many natural phenomena, sampling distributions, central limit theorem
Simple Numerical Problems:
- Calculating probabilities using binomial, Poisson, and normal distributions
- Finding z-scores and using standard normal tables
- $z = \frac{x - \mu}{\sigma}$ — the number of standard deviations a value is from the mean
Key Terms
- Probability, Event, Conditional Probability, Addition Law, Multiplication Law, Binomial Distribution, Poisson Distribution, Normal Distribution, Random Variable, Mean, Variance, Standard Deviation, Z-score, Empirical Rule, Mutually Exclusive, Independent Events
Unit Summary
Probability theory provides the mathematical foundation for quantifying uncertainty. Understanding probability distributions (binomial, Poisson, normal) is essential for statistical inference and real-world problem-solving. The normal distribution's empirical rule and z-scores enable probability calculations for any normal distribution by standardizing to the standard normal distribution.
Practice Questions
Q1. What is the probability of getting exactly 3 heads in 5 coin tosses? (Answer: Use binomial distribution with n=5, p=0.5, k=3: $P(X=3) = \binom{5}{3} (0.5)^3 (0.5)^2 = 10 \cdot 0.125 \cdot 0.25 = 0.3125$)
Q2. State the two basic laws of probability. (Answer: Addition Law and Multiplication Law.)
Q3. What is the difference between mutually exclusive and independent events? (Answer: Mutually exclusive cannot occur together; independent occurrence of one doesn't affect the other.)
Q3.1. (Alternative) If A and B are independent with P(A) = 0.5 and P(B) = 0.3, what is P(A ∩ B)? (Answer: 0.15)
Q4. Define conditional probability and give its formula. (Answer: $P(A|B) = \frac{P(A \cap B)}{P(B)}$, where $P(B) > 0$.)
Q5. The probability that it rains on a given day is 0.4. What is the probability it does not rain? (Answer: 1 - 0.4 = 0.6)
Q6. What are the properties of a binomial distribution? (Answer: Fixed n, two outcomes, constant p, independent trials; mean = np, variance = np(1-p).)
Q7. For a Poisson distribution with λ = 3, what are the mean and variance? (Answer: Both are 3.)
Q8. What is the standard normal distribution? (Answer: Normal distribution with μ = 0 and σ = 1, denoted as Z.)
Q9. If a dataset is normally distributed with mean 50 and standard deviation 10, what percentage of data falls between 40 and 60? (Answer: ~68% by empirical rule.)
Q10. Calculate the z-score for a value of 70 from a normal distribution with mean 50 and standard deviation 10. (Answer: $z = \frac{70-50}{10} = 2.0$)
Q11. What is the empirical rule and what does it state? (Answer: ~68% within 1σ, ~95% within 2σ, ~99.7% within 3σ for normal distributions.)
Q12. The time taken to complete a task is normally distributed with mean 30 minutes and standard deviation 5 minutes. What is the probability a task takes more than 40 minutes? (Answer: Find z = (40-30)/5 = 2.0, then P(Z > 2.0) ≈ 0.0228 or 2.28%.)
Unit 5: Sample Survey
Teaching Hours: 6
Concept of Population and Sample:
- Population: The entire group of individuals or objects that is the subject of statistical study. In a computer science context, could be all computers in a network, all users of a system.
- Sample: A subset of the population selected for study. A well-chosen sample can provide accurate insights about the population.
- Parameter: Numerical measure describing a population characteristic (e.g., population mean $\mu$).
- Statistic: Numerical measure describing a sample characteristic (e.g., sample mean $\bar{x}$).
Needs of Sampling:
- Why Sampling? Studying entire populations is often impractical (too costly, time-consuming, destructive). For example, testing every component in a batch would be destructive; sampling saves time and resources.
- Sampling Advantages: Cost-effective, time-efficient, feasible for destructive testing, provides adequate accuracy for decision-making, reduces respondent burden.
Censuses and Sample Survey:
- Census: Collecting data from every member of the population. Provides complete information but is often expensive and time-consuming.
- Sample Survey: Collecting data from a subset (sample) of the population. Provides estimates about the population with known precision.
Basic Concept of Sampling:
- Sampling Frame: List of population members from which sample is drawn. Must be comprehensive and accurate.
- Sampling Unit: Entity or person eligible for selection. The unit of analysis must be clearly defined.
- Sample Size: Number of elements in the sample. Larger samples generally provide more precise estimates but at higher cost.
Questionnaire Design: Sample Selection and Determination of Sample Size:
-
Questionnaire Design: Creating effective survey questions.
- Clear, unambiguous, concise questions
- Logical flow and ordering
- Avoid leading or biased questions
- Proper scaling (Likert scale, semantic differential, etc.)
-
Sample Selection: Choosing members from the sampling frame.
- Probability vs. non-probability sampling
- Random selection techniques (random number tables, computer-generated random samples)
-
Determination of Sample Size: Factors affecting sample size.
- Population size (has diminishing effect for large populations)
- Margin of error (desired precision) — how close the estimate should be to the true value
- Confidence level (typically 95%) — how confident we are that the true parameter lies within the interval
- Population variability (more variability requires larger sample)
- Formula for sample size: $n = \frac{z^2 \cdot p \cdot (1-p)}{e^2}$ for proportion estimates, where z is the z-score for the desired confidence level, p is the estimated proportion (use 0.5 for maximum variability), and e is the margin of error.
Sampling and Non-Sampling Errors:
-
Sampling Errors: Errors from observing a sample instead of entire population.
- Random Sampling Error: Variability between sample statistics from different samples.
- Systematic Error: Bias in sampling design or execution that consistently over- or under-estimates the true value.
-
Non-Sampling Errors: Errors not related to sampling.
- Non-Response: Some selected individuals don't respond. Can introduce bias if non-respondents differ from respondents.
- Response Bias: Answers don't reflect true feelings/behaviors. Caused by question wording, interviewers, or social desirability.
- Measurement Error: Poorly worded questions, interviewer influence, misunderstanding of terms.
- Data Processing Error: Coding, entry, analysis mistakes (e.g., data entry typos, incorrect formula application).
Key Terms
- Population, Sample, Parameter, Statistic, Sampling Frame, Sampling Unit, Census, Questionnaire, Sample Size, Margin of Error, Confidence Level, Probability Sampling, Non-Sampling Error, Non-Response, Response Bias, Measurement Error
Unit Summary
Sampling enables statistical analysis of large populations through representative subsets. Proper questionnaire design, sample selection, and sample size determination are critical for obtaining valid and reliable results. The trade-off between precision (small margin of error) and cost (sample size) must be carefully balanced. Non-sampling errors can be as significant as sampling errors and must be addressed through good design and execution.
Practice Questions
Q1. What is the difference between a parameter and a statistic? (Answer: Parameter describes population; statistic describes sample.)
Q2. Why is sampling often preferred over a census? (Answer: Census is costly, time-consuming, may be impractical or destructive; sampling is cost-effective and efficient.)
Q3. What is a sampling frame? (Answer: List of population members from which sample is drawn.)
Q4. What factors affect the determination of sample size? (Answer: Population size, margin of error, confidence level, population variability.)
Q5. If a researcher wants a 95% confidence level and 5% margin of error for a proportion estimate, and uses p = 0.5 (maximum variability), what sample size is needed? (Answer: Approximately 385 using formula $n = \frac{z^2 \cdot p \cdot (1-p)}{e^2}$ with z = 1.96.)
Q6. What is the difference between sampling error and non-sampling error? (Answer: Sampling error from sample vs. population; non-sampling error from data collection, processing, or analysis issues.)
Q7. Explain the concept of margin of error in survey results. (Answer: Range within which true population parameter is expected to lie, given the confidence level.)
Q8. Describe three types of non-response errors and how to minimize them. (Answer: Voluntary response, item non-response, unit non-response; minimize through follow-ups, incentives, good questionnaire design.)
Q9. What is systematic error in sampling? (Answer: Bias introduced by sampling design or execution, consistently over- or under-estimating the true value.)
Q10. Write a short questionnaire with 3-4 questions on a topic of your choice, applying good questionnaire design principles. (Answer: Provided in solution section.)
Unit 6: Sample Survey Methods
Teaching Hours: 10
Types of Sampling:
-
Simple Random Sampling:
- With replacement (each unit returned to population after selection, less common)
- Without replacement (unit not returned, most common)
- Each possible sample of size n has equal probability of selection.
-
Stratified Random Sampling:
- Population divided into homogeneous subgroups (strata) based on a characteristic (e.g., year level, department).
- Random sample drawn from each stratum.
- Ensures representation of key subgroups and typically reduces variance compared to simple random sampling.
-
Ratio and Regression Method of Estimation under Simple and Stratified Random Sampling:
- Ratio estimator: Uses known population total of auxiliary variable (a variable correlated with the study variable). Estimate: $\hat{T}_{ratio} = \frac{\bar{y}}{\bar{x}} \cdot T_x$ where $\bar{y}$ is sample mean of study variable, $\bar{x}$ is sample mean of auxiliary variable, and $T_x$ is known population total of auxiliary variable.
- Regression estimator: Uses regression relationship between study and auxiliary variable. Generally more precise than ratio estimator when the relationship is not forced through the origin.
-
Systematic Sampling:
- Selecting every kth element from ordered list (k = N/n, the sampling interval).
- Random start between 1 and k.
- Advantage: Simple, evenly spread across the population.
- Disadvantage: Periodicity can introduce bias if there's a regular pattern in the ordered list that aligns with the sampling interval.
-
Cluster Sampling:
- Population divided into clusters (usually geographical groups like villages, campuses, city blocks).
- Random sample of clusters selected (often using simple random sampling).
- All units within selected clusters surveyed.
- Advantage: Cost-effective for dispersed populations, reduces travel and logistics costs.
- Disadvantage: Higher variance than simple random sampling for the same sample size (clusters are typically heterogeneous, so between-cluster variation adds variability).
-
Multistage Sampling:
- Combination of cluster and stratified sampling in stages.
- First stage: Random clusters are selected.
- Subsequent stages: Random units within selected clusters are chosen (possibly using stratified or simple random sampling).
- Advantage: Flexible, practical for large-scale surveys (e.g., national studies).
- Disadvantage: More complex to design and analyze; variance estimation is more involved.
-
Probability Proportion to Size Sampling (PPS):
- Sample size proportional to cluster size.
- Larger clusters have higher selection probability.
- Useful when cluster sizes vary greatly (e.g., some schools have hundreds of students, others have dozens).
- Estimation of Population Total and its Variance:
- Methods for estimating totals from sample data.
- Calculation of variance/standard error of estimates using methods like successive differences or Yates-Grundy.
Key Terms
- Simple Random Sampling, Stratified Random Sampling, Systematic Sampling, Cluster Sampling, Multistage Sampling, PPS, Population Total, Variance, Estimation, Auxiliary Variable
Unit Summary
Different sampling methods serve different research needs. The choice of sampling technique depends on population structure, research objectives, budget, and desired precision. Proper sampling design is essential for valid statistical inference. Multistage and PPS sampling are particularly useful for large, dispersed populations common in computer science and business research.
Practice Questions
Q1. What is the difference between simple random sampling with and without replacement? (Answer: With replacement: selected unit returned to population; Without replacement: unit not returned, most common approach.)
Q2. Explain stratified random sampling and its advantage over simple random sampling. (Answer: Population divided into homogeneous strata; ensures key subgroups are represented; reduces variance.)
Q3. Describe systematic sampling procedure. (Answer: Select every kth element from ordered list with random start between 1 and k.)
Q4. What is the advantage of cluster sampling? (Answer: Cost-effective for dispersed populations, as only selected clusters need to be surveyed.)
Q5. What is PPS sampling and when is it used? (Answer: Probability Proportion to Size; used when cluster sizes vary greatly, larger clusters have higher selection probability.)
Q6. Compare stratified random sampling and cluster sampling. (Answer: Stratified: divides into homogeneous groups, samples from each; Cluster: divides into heterogeneous groups, samples entire selected clusters.)
Q7. In systematic sampling with N = 100 and n = 10, what is the sampling interval k? (Answer: k = 100/10 = 10.)
Q7.1. (Alternative) Explain the ratio method of estimation in stratified sampling. (Answer: Uses known population total of auxiliary variable to improve estimate precision.)
Q8. Describe multistage sampling with an example. (Answer: First stage: randomly select districts; second stage: randomly select households within districts.)
Q9. The difference between cluster sampling and multistage sampling is that multistage... (Answer: involves sampling at multiple levels, typically combining cluster and stratified approaches.)
Q10. Explain how to estimate the population total using stratified random sampling. (Answer: Sum of stratum estimates: $\hat{T} = \sum N_h \bar{y}_h$, where $N_h$ is stratum size and $\bar{y}_h$ is stratum mean.)
Q11. What is the advantage of multistage sampling over simple random sampling for large-scale national surveys? (Answer: More practical and cost-effective, as it reduces travel and logistics costs by clustering.)
Unit 7: Design of experiment
Teaching Hours: 6
Concept of Analysis of Variance (ANOVA):
- Definition: Statistical method for comparing means of three or more groups. ANOVA tests whether the observed differences between group means are statistically significant or due to random chance.
- F-Statistic and its Distribution: Ratio of variance between groups to variance within groups; follows F-distribution under the null hypothesis. $F = \frac{MS_{between}}{MS_{within}}$.
- Linear Model in ANOVA: $Y_{ij} = \mu + \tau_i + \epsilon_{ij}$, where $\mu$ is overall mean, $\tau_i$ is treatment effect (group i effect), and $\epsilon_{ij}$ is random error.
Analysis of One Way:
- One-Way ANOVA: Compares means of k independent groups. Tests the null hypothesis that all group means are equal.
- Assumptions:
- Normality: Populations from which samples are drawn are normally distributed.
- Homogeneity of variances: Variances of the populations are equal (tested via Levene's test or Bartlett's test).
- Independence: Observations are independent of each other.
- Hypotheses:
- $H_0: \mu_1 = \mu_2 = \cdots = \mu_k$ (all group means equal)
- $H_1:$ At least one mean is different
- ANOVA Table: Source of Variation, Sum of Squares (SS), Degrees of Freedom (df), Mean Square (MS), F-statistic.
- Between-group SS: $\sum n_i (\bar{y}_i - \bar{y})^2$ — measures variability between group means and the overall mean.
- Within-group SS: $\sum \sum (y_{ij} - \bar{y}_i)^2$ — measures variability within each group around its own mean.
- df Between: k - 1 (degrees of freedom for between-group variability).
- df Within: N - k (degrees of freedom for within-group variability, where N is total sample size).
- MS Between: SS_Between / df_Between — mean square between groups.
- MS Within: SS_Within / df_Within — mean square within groups.
- F-statistic: MS_Between / MS_Within — ratio used to test the null hypothesis.
Two Way Classification:
- Two Way ANOVA (I and m observations per cell):
- Fixed Effect Model: Both factors are fixed (interest in specific levels, not random sample from larger population).
- Interaction Effect: Whether the effect of one factor depends on the level of the other factor. If interaction is present, main effects may not be interpretable alone.
- Model: $Y_{ijk} = \mu + \alpha_i + \beta_j + (\alpha\beta){ij} + \epsilon{ijk}$ where $\alpha_i$ is effect of factor A at level i, $\beta_j$ is effect of factor B at level j, and $(\alpha\beta)_{ij}$ is the interaction effect.
- Tests: Main effect of factor A, main effect of factor B, interaction effect A×B.
- ANOVA Table for Two-Way: Includes sources for A, B, A×B, Error.
- SS for A, SS for B, SS for A×B, SS Error (within-cell variability).
- df for A (a-1), df for B (b-1), df for A×B (a-1)(b-1), df Error (ab(m-1)).
- MS and F statistics for each effect.
Key Terms
- ANOVA, F-Statistic, Variance, One-Way, Two-Way, Fixed Effect, Random Effect, Interaction, Sum of Squares, Degrees of Freedom, Mean Square, Hypothesis Testing, Treatment, Block, Main Effect, Interaction Effect
Unit Summary
Analysis of Variance (ANOVA) is a powerful statistical technique for comparing means across multiple groups. One-way and two-way ANOVA designs allow testing of main effects and interaction effects in experimental settings. The F-statistic provides a formal test of whether observed differences are significant, and the ANOVA table organizes the decomposition of total variability into meaningful components.
Practice Questions
Q1. What is the purpose of ANOVA? (Answer: To compare means of three or more groups and determine if at least one is significantly different.)
Q2. What are the assumptions of one-way ANOVA? (Answer: Normality of populations, homogeneity of variances, independence of observations.)
Q3. Explain the F-statistic in one-way ANOVA. (Answer: Ratio of mean square between groups to mean square within groups; follows F-distribution under null hypothesis.)
Q4. What are the hypotheses for one-way ANOVA? (Answer: H₀: all group means are equal; H₁: at least one group mean is different.)
Q5. Describe the ANOVA table layout for one-way classification. (Answer: Sources: Between Groups, Within Groups; SS, df, MS, F.)
Q5.1. (Alternative) What is the total sum of squares (TSS) decomposition in ANOVA? (Answer: TSS = SS_Between + SS_Within.)
Q6. What is the difference between one-way and two-way ANOVA? (Answer: One-way compares one factor; two-way compares two factors and their interaction.)
Q6.1. (Alternative) What does a significant interaction effect in two-way ANOVA indicate? (Answer: The effect of one factor depends on the level of the other factor.)
Q7. If F-statistic is very large, what does it indicate? (Answer: Large between-group variance relative to within-group variance, suggesting group means are not all equal.)
Q7.1. (Alternative) What does a non-significant F-statistic indicate? (Answer: No significant difference between group means; fail to reject null hypothesis.)
Q8. In a two-way ANOVA with interaction, if the interaction is significant, what should be interpreted? (Answer: Main effects may not be meaningful; focus on simple effects or cell-by-cell analysis.)
Q8.1. (Alternative) How do you interpret main effects when interaction is not significant? (Answer: Main effects can be interpreted independently as the average effect of each factor across levels of the other factor.)
Q9. For a one-way ANOVA with 3 groups and 15 observations total, what are the degrees of freedom? (Answer: df_Between = 2, df_Within = 12, df_Total = 14.)
Q10. Write the linear model equation for two-way ANOVA with interaction. (Answer: $Y_{ijk} = \mu + \alpha_i + \beta_j + (\alpha\beta){ij} + \epsilon{ijk}$.)
Q11. What is the difference between fixed-effect and random-effect models in ANOVA? (Answer: Fixed-effect: interest in specific levels; Random-effect: levels are random sample from larger population.)
Q12. Explain the concept of post-hoc tests in ANOVA. (Answer: Multiple comparison tests (Tukey, Bonferroni) conducted after significant ANOVA to determine which specific means differ.)
Q13. In a one-way ANOVA, if the null hypothesis is rejected, which post-hoc test would you use to determine which specific groups differ, and why? (Answer: Tukey's HSD is appropriate for pairwise comparisons while controlling family-wise error rate; Bonferroni is more conservative for multiple comparisons.)
References
- Snedecor, G.W., & Cochran, W.G. (1989). Statistical Methods (8th ed.). Iowa State University Press.
- Levin, R.I., & Rubin, D.S. (2018). Statistics for Management. Pearson.
- Gupta, S.C., & Kapoor, V.K. (2018). Fundamentals of Mathematical Statistics. S. Chand.
- TU BCA Syllabus (2025). Probability and Statistics (BCA205), Semester 3. Tribhuvan University. Source: content/syllabi/semester-3/probability-and-statistics/2025.md (no detailed numbered unit outline in the cited document).
Content Audit
- Unit Count: 7 (structure not verified against 2025 syllabus; no detailed unit outline in 2025 source)
- Topic Count: 45
- Covered Topic Count: unverified against 2025 syllabus
- Word Count: ~4800
- Unresolved Items: Unit outline vs 2025 syllabus (2025 source has no verified numbered unit outline)