Probability and Statistics

Chapter 2
Descriptive Statistics and Exploratory Data Analysis

Bachelors Program in AI & ML
Probability and Statistics   •   Bachelor

Descriptive Statistics and Exploratory Data Analysis

Introduction and Context

Probability and statistics provide the language through which data are described, interpreted, and used for decision-making. Before estimating unknown parameters, testing hypotheses, or training a machine-learning model, an analyst must understand the structure and quality of the available data. Descriptive statistics and exploratory data analysis (EDA) address this initial need.

Descriptive statistics summarize observed data using numerical measures, tables, and graphs. Exploratory data analysis extends this activity by encouraging systematic investigation of patterns, unusual observations, relationships, missing values, and possible data-quality problems. EDA is not merely a presentation step. It is an analytical process that helps formulate questions, select appropriate methods, identify assumptions, and avoid misleading conclusions.

In artificial intelligence and machine learning, EDA is especially important because algorithms learn from the data supplied to them. Incorrect data types, extreme values, skewed distributions, duplicated records, leakage, and hidden subgroup differences can substantially reduce model reliability. A technically sophisticated model cannot compensate for fundamentally misunderstood data.

Learning Objectives

After studying this chapter, a student should be able to:

1. Distinguish categorical, numerical, discrete, continuous, nominal, ordinal, interval, and ratio data.

2. Construct and interpret frequency tables, histograms, bar charts, box plots, scatterplots, and related displays.

3. Calculate and interpret measures of central tendency, dispersion, position, and association.

4. Explain quantiles, skewness, outliers, and robust summaries.

5. Select suitable transformations and recognize their limitations.

6. Conduct a structured univariate, bivariate, and multivariate EDA.

7. Communicate exploratory findings responsibly, including uncertainty and ethical concerns.

1. Data Types and the Structure of a Dataset

A dataset consists of observations, often called cases or records, and variables, also called features, attributes, or fields. A data matrix commonly has rows representing observations and columns representing variables.

1.1 Categorical and numerical variables

A categorical variable records membership in groups. Examples include payment method, product category, and diagnosis class. A numerical variable represents quantities for which arithmetic operations are meaningful, such as income, temperature, distance, or response time.

Categorical variables may be:

  • Nominal: categories have no inherent order, such as browser type or blood group.
  • Ordinal: categories have an order, but differences between adjacent categories are not necessarily equal, such as satisfaction levels from poor to excellent.

Numerical variables may be:

  • Discrete: countable values, usually integers, such as number of defects.
  • Continuous: values on a continuum, such as height, duration, or voltage.

Measurement scales also include interval and ratio scales. On an interval scale, differences are meaningful but zero is arbitrary; Celsius temperature is an example. On a ratio scale, both differences and ratios are meaningful because zero represents absence of the measured quantity; mass and elapsed time are examples. The measurement scale determines which summaries and transformations are defensible.

A category encoded as 1, 2, and 3 is not automatically numerical. If these values represent bronze, silver, and gold membership, treating them as measurements may produce meaningless averages. Encoding is not the same as measurement.

1.2 Data quality checks

Before summarizing data, an analyst should inspect:

  • missing values and their patterns;
  • duplicate records;
  • impossible or implausible values;
  • inconsistent units and category labels;
  • data-entry errors;
  • sampling dates and temporal coverage;
  • identifiers accidentally used as predictors;
  • possible target leakage, in which information unavailable at prediction time is included in a feature.

A summary statistic is only as trustworthy as the data-generating and data-recording process behind it.

2. Organizing and Visualizing Data

2.1 Frequency distributions

A frequency table lists categories or numerical intervals and the number of observations in each. If category i occurs f_i times in a dataset of n observations, its relative frequency is

p_i = f_i / n.

The percentage frequency is 100p_i percent. Relative frequencies are useful for comparing datasets of different sizes. For ordered values, cumulative frequency gives the number or proportion of observations less than or equal to a specified value.

For continuous measurements, values are often grouped into class intervals. Intervals should be mutually exclusive and collectively exhaustive, although excessive grouping can conceal important structure. Class widths should generally be consistent unless there is a clear analytical reason to use unequal widths.

2.2 Graphical displays

Bar charts display frequencies for categorical values. Bars are separated because categories are distinct. Ordering categories by frequency can improve readability, while preserving a natural order is preferable for ordinal data.

Histograms display numerical data grouped into adjacent intervals. Their appearance depends strongly on bin width and boundary choices. Too few bins can hide multimodality; too many can emphasize random variation. A histogram should be interpreted together with sample size and measurement precision.

Density plots provide a smoothed representation of a numerical distribution. The degree of smoothing affects the apparent number of modes, so density plots should not be treated as objective replacements for histograms.

Dot plots show individual observations and are particularly useful for small datasets. They reveal repeated values, clusters, and gaps.

Box plots summarize a distribution through the minimum or lower whisker, first quartile, median, third quartile, and upper whisker. In the common Tukey convention, the interquartile range is IQR = Q3 − Q1. The lower and upper fences are Q1 − 1.5(IQR) and Q3 + 1.5(IQR). Points beyond the whiskers are plotted individually. These points are potential outliers, not automatically errors.

Scatterplots display paired numerical observations. They help reveal direction, form, strength, clusters, and unusual points in a relationship. A line or smooth curve may be added, but the visual association does not by itself establish causation.

Mosaic plots and grouped bar charts are useful for examining relationships between categorical variables. A heat map can display a matrix of counts, proportions, or association measures, but color scales must be labeled carefully.

2.3 Principles of effective visualization

A good graphic makes the data easier to compare without distorting perception. Axes should be labeled with units, scales should be appropriate, legends should be interpretable, and missing observations should not be silently omitted. Three-dimensional effects, unnecessary decoration, and truncated axes can exaggerate differences. For dashboards, accessibility requires adequate contrast, non-color encodings, and readable labels.

3. Measures of Central Tendency

Central tendency describes a typical or central location. No single measure is universally best.

3.1 Mean

For observations x_1, x_2, ..., x_n, the arithmetic sample mean is

x̄ = (1/n) Σ x_i, for i = 1 to n.

The mean uses every value and is appropriate when numerical observations are reasonably symmetric and extreme values are not dominant. It is sensitive to outliers. For data measured in kilograms, for example, the mean is also measured in kilograms.

A weighted mean is

x̄_w = (Σ w_i x_i) / (Σ w_i),

where w_i are nonnegative weights and at least one weight is positive. The weights must have a defensible interpretation, such as sampling weights or frequencies. Incorrect weighting can bias results.

3.2 Median

The median is the middle ordered observation. If n is odd, it is the observation at position (n + 1)/2. If n is even, it is commonly defined as the average of the observations at positions n/2 and n/2 + 1. The median is resistant to extreme values and is often preferred for skewed income, waiting-time, or property-price data.

3.3 Mode

The mode is the most frequently occurring value or category. A dataset may have one mode, several modes, or no uniquely dominant mode. It is the only central-tendency measure directly applicable to purely nominal data.

3.4 Choosing a summary

For a roughly symmetric unimodal distribution, mean and median may be similar. A substantial difference between them can indicate skewness or influential observations, although it is not a complete diagnostic. For skewed data, reporting median with quartiles is often more informative than reporting mean alone. For categorical data, report counts and percentages rather than an arithmetic mean of arbitrary codes.

Worked Example 1: Comparing mean and median

Consider response times in seconds: 8, 9, 10, 10, 11, 12, 40.

The mean is

x̄ = (8 + 9 + 10 + 10 + 11 + 12 + 40) / 7 = 100 / 7 ≈ 14.29 seconds.

The median is the fourth ordered observation, 10 seconds. The unusually long response of 40 seconds raises the mean considerably, while the median remains representative of the typical response. An analyst should investigate whether 40 seconds reflects a genuine difficult case, a system failure, or a recording error rather than deleting it automatically.

4. Measures of Dispersion and Shape

Location alone is incomplete. Two datasets can have the same mean but very different variability.

4.1 Range and interquartile range

The range is maximum minus minimum. It is simple but highly sensitive to extreme values. The interquartile range is

IQR = Q3 − Q1,

where Q1 is the 25th percentile and Q3 is the 75th percentile. The IQR describes the spread of the middle half of the observations and is resistant to extreme values.

Quartile definitions vary slightly among software systems, especially for small samples. An analyst should document the method used when exact reproducibility matters.

4.2 Variance and standard deviation

For a sample of n observations, the sample variance is

s² = [Σ(x_i − x̄)²] / (n − 1).

The sample standard deviation is

s = √s².

The denominator n − 1, rather than n, is used for the conventional unbiased estimator of a population variance when observations are treated as a random sample under standard assumptions. The units of variance are squared units, whereas standard deviation has the original units.

For a complete finite population with mean μ and population size N, the descriptive population variance is

σ² = [Σ(x_i − μ)²] / N.

Confusing sample and population formulas is a common source of error. Standard deviation is most interpretable when the distribution is not severely skewed and when deviations around the mean are meaningful.

4.3 Coefficient of variation

For positive measurements with a meaningful zero, the coefficient of variation is

CV = s / x̄,

often reported as a percentage by multiplying by 100. It compares relative variability across scales. It is inappropriate when the mean is zero or near zero, when values can be negative in a way that makes ratios meaningless, or when the zero point is arbitrary, as with Celsius temperature.

4.4 Shape: skewness and modality

A right-skewed distribution has a long tail toward larger values; a left-skewed distribution has a long tail toward smaller values. Skewness can influence the relationship among mean, median, and mode, but those relationships are descriptive tendencies rather than universal laws.

A distribution may be unimodal, bimodal, or multimodal. Multiple modes may indicate distinct subpopulations, operating regimes, or data collected from different sources. A single overall mean can conceal this structure.

Formal skewness coefficients exist, but their numerical values depend on the chosen estimator and can be unstable in small samples. Visual inspection and domain knowledge should accompany any coefficient.

5. Quantiles and Measures of Position

The pth quantile is a value below which approximately p proportion of observations fall, where 0 ≤ p ≤ 1. The median is the 0.5 quantile; Q1 and Q3 are approximately the 0.25 and 0.75 quantiles. Percentiles are quantiles expressed on a 0–100 scale.

Quantiles are useful for service-level agreements, admission thresholds, salary comparisons, and risk monitoring. For example, the 95th percentile of server latency indicates a level below which approximately 95% of observed latencies fall under the specified data and time conditions. It does not imply that every future observation will remain below that value.

The five-number summary consists of minimum, Q1, median, Q3, and maximum. It is compact but does not show all distributional details. The empirical cumulative distribution function (ECDF) assigns each value its cumulative proportion and provides a direct, nonparametric view of the distribution.

The z-score of an observation is

z_i = (x_i − x̄) / s,

when a sample mean and sample standard deviation are used. It expresses distance from the sample mean in standard-deviation units. A z-score is not automatically a probability, and the often-used rule that values beyond ±2 or ±3 are unusual depends on distributional shape and context.

6. Association Between Variables

6.1 Numerical variables

Covariance between two sample variables X and Y is

s_xy = [Σ(x_i − x̄)(y_i − ȳ)] / (n − 1).

Its magnitude depends on measurement units, which makes direct comparison difficult. Pearson’s sample correlation is

r = s_xy / (s_x s_y),

provided both sample standard deviations are nonzero. It lies between −1 and 1. A positive value indicates that larger values of one variable tend to accompany larger values of the other; a negative value indicates the opposite tendency. Values near zero indicate little linear association, not necessarily no association.

Correlation is sensitive to outliers and can miss nonlinear relationships. A scatterplot should therefore precede interpretation of r. Correlation also does not establish causation: a third variable, selection process, reverse direction, or coincidence may explain the association.

Spearman’s rank correlation applies Pearson correlation to ranks and can be useful for monotonic relationships or ordinal data. It is still not a causal measure and can be affected by ties and unusual observations.

6.2 Categorical variables

For two categorical variables, analysts may compare conditional proportions. For example, the proportion of customers who renew can be compared across subscription plans. Counts alone can mislead when group sizes differ. Row percentages, column percentages, and carefully labeled denominators are essential.

A stacked bar chart, mosaic plot, or contingency table can reveal association. The chi-square test and measures such as Cramér’s V are inferential tools that may be introduced later; EDA should first examine the actual counts and practical magnitude of differences.

6.3 Association is not causation

An observed association may arise from confounding, selection bias, measurement bias, or temporal coincidence. In AI applications, a highly predictive feature may be a proxy for a protected attribute or may encode a process that will change after deployment. Predictive usefulness and causal meaning are different claims.

7. Outlier Analysis

An outlier is an observation that appears unusually distant from the remainder of the data under a chosen definition. Outliers may result from data-entry errors, sensor malfunction, rare but genuine events, population mixtures, or normal heavy-tailed variation.

A responsible workflow is:

1. Detect the observation using a plot or rule.

2. Verify its value, unit, timestamp, and provenance.

3. Compare it with domain constraints and related variables.

4. Decide whether to retain, correct, transform, cap, model separately, or exclude it.

5. Record the decision and assess sensitivity of conclusions.

The IQR fence rule is useful for flagging potential outliers, but it is not a universal deletion rule. In fraud detection, network security, and equipment failure analysis, unusual observations may be the most important cases. Removing them can destroy the very signal an analysis is intended to find.

Influential observations are a related but distinct concept. An observation may strongly change a fitted model even if it is not extreme in one variable. Influence should be assessed relative to the planned model, not only through univariate box plots.

8. Transformations and Standardization

Transformations can improve visualization, stabilize variability, reduce skewness, or make relationships more nearly linear. They do not create information and may complicate interpretation.

Common transformations include:

  • logarithm: y = log(x), requiring x > 0;
  • square root: y = √x, requiring x ≥ 0;
  • reciprocal: y = 1/x, requiring x ≠ 0;
  • power transformations such as x^λ, with conditions depending on λ and the data.

For nonnegative count data, square-root transformations may reduce the visual dominance of large counts. For positive right-skewed measurements, logarithms often make multiplicative differences easier to examine. If zeros are present, adding an arbitrary constant before logging changes interpretation and should be justified; alternatives such as specialized count or hurdle models may be preferable.

Standardization produces

z_i = (x_i − x̄) / s,

so the transformed sample has mean approximately zero and standard deviation one, subject to the chosen convention. Standardization is useful when variables measured in different units are used in distance-based algorithms or regularized models. It does not make a distribution normal, remove outliers, or guarantee comparability when measurement meanings differ.

Robust alternatives include centering by the median and scaling by the IQR or median absolute deviation. Such procedures reduce the effect of extreme observations but should be explained clearly.

9. A Structured EDA Workflow

A practical EDA workflow is iterative rather than strictly linear.

Step 1: Clarify the question and data-generating process

Identify the unit of analysis, target population, observation period, sampling mechanism, and intended decision. A graph cannot correct a biased sample or an ill-defined variable.

Step 2: Inspect structure and quality

Review dimensions, variable types, unique values, missingness, duplicates, units, and plausible ranges. Separate identifiers from analytical variables.

Step 3: Conduct univariate analysis

For each variable, choose summaries and displays appropriate to its measurement scale. Examine distributions, missingness, and potential outliers.

Step 4: Conduct bivariate analysis

Compare numerical variables with scatterplots and suitable association measures. Compare categorical variables with cross-tabulations and conditional proportions. For numerical outcomes across categories, use grouped plots such as box plots or violin plots, while remembering that each display has assumptions and design choices.

Step 5: Conduct multivariate analysis

Examine interactions among several variables. Use pair plots for small sets of numerical variables, correlation heat maps with caution, grouped summaries, parallel-coordinate plots, and dimension-reduction displays when appropriate. Color or facet plots by meaningful groups, but avoid generating many comparisons without a clear purpose.

Step 6: Investigate missingness and subgroups

Missingness may be concentrated in a particular population, time period, device, or outcome class. Compare distributions across relevant groups. Apparent overall patterns can reverse within subgroups, a phenomenon related to Simpson’s paradox.

Step 7: Document and communicate

Record data versions, filtering rules, transformations, software settings, and decisions about exclusions. Clearly distinguish observation from interpretation and exploratory finding from confirmatory evidence.

10. Multivariate Exploratory Techniques

Multivariate EDA studies several variables jointly. It is valuable because relationships often depend on context.

A pair plot combines univariate distributions and pairwise scatterplots. It can reveal clusters, nonlinear patterns, and variable redundancy, but becomes difficult to read as the number of variables increases.

A correlation matrix summarizes linear associations among numerical variables. Strong correlation can indicate redundancy, but weak pairwise correlations do not rule out nonlinear or joint relationships.

Principal component analysis (PCA) is a dimension-reduction technique that constructs orthogonal linear combinations of centered variables. When variables have different units, analysts often standardize them first. The first principal component captures the greatest variance among all unit-length linear combinations, and later components capture the greatest remaining variance subject to orthogonality. PCA is descriptive, not automatically causal, and its interpretation depends on scaling and variable selection.

Clustering displays can reveal groups, but clusters may be artifacts of scaling, distance choice, initialization, or imposed algorithmic assumptions. A cluster is not necessarily a naturally existing group.

For categorical and mixed-type data, suitable methods may include correspondence analysis, multiple correspondence analysis, or mixed-data ordination. The method should match the data structure rather than being selected solely because it produces an attractive visualization.

11. Detailed Applied Case: Predicting Customer Churn

Background

This illustrative case concerns a subscription software company that wants to understand why customers cancel service. The dataset contains customer tenure, monthly fee, support contacts, plan type, region, service interruptions, and a binary churn indicator.

Problem

The company initially reports that customers with more support contacts churn more often. Management considers reducing support access, but the conclusion may be misleading because customers experiencing technical problems may contact support more frequently.

Analysis

The analyst first checks definitions and timing. Support contacts must be counted before cancellation, not after it. Duplicate customer records are removed, currency units are standardized, and missing regional codes are investigated. A frequency table shows that the premium plan contains far more customers than the basic plan, so raw churn counts are not compared without denominators.

Histograms reveal that monthly fees are right-skewed. The median is reported with Q1 and Q3, while the mean is retained for financial planning because total revenue depends on arithmetic averages. A box plot identifies several unusually high support-contact counts. Investigation shows that most are genuine customers with repeated outages, not data errors.

Grouped bar charts show churn percentages by plan. Scatterplots of tenure and monthly fee are colored by churn status. The analyst observes that short-tenure customers have higher churn, but the pattern differs by plan. A contingency table also shows that service interruptions are concentrated in one region.

Approach and solution

The analyst creates a transparent EDA report rather than deleting high-contact customers. Analyses are stratified by plan and region, and a time-based split is reserved for later predictive evaluation. Features recorded after cancellation are excluded to prevent leakage. Missingness indicators are examined because missing service-quality records are more common for a recently acquired platform.

The exploratory findings suggest that support contacts are a symptom of service problems rather than evidence that support causes churn. The company tests a service-recovery intervention for customers experiencing repeated interruptions. Any causal claim is reserved for the intervention study, not inferred from the original correlations.

Outcome

The company changes its operational focus from restricting support to prioritizing rapid technical resolution. The later experiment reports reduced churn among affected customers, although the EDA alone could not establish that outcome.

Learning points

1. Denominators are essential when comparing groups.

2. Outliers can represent important operational cases.

3. Temporal ordering is necessary to prevent leakage.

4. Stratification can reveal patterns hidden in aggregate summaries.

5. Prediction, association, and causation must be reported as different claims.

12. Challenges, Ethics, and Governance

EDA involves judgment, and judgment can introduce bias. Analysts may selectively display plots that support a preferred narrative, repeatedly search for patterns until one appears significant, or remove inconvenient observations without documentation. Exploratory findings should therefore be labeled as exploratory and, where possible, evaluated on new data.

Privacy must be protected when visualizations contain individual-level records. Small subgroup counts can enable re-identification even when names are removed. Sensitive attributes should be handled according to institutional policy and applicable data-protection law. Access controls, minimization, aggregation, and audit trails are important safeguards.

Fairness analysis requires examining distributions and error-relevant variables across meaningful groups. An overall average can conceal poor performance for a minority group. However, subgroup analysis must also respect privacy and avoid stigmatizing interpretations. Categories such as race, gender, disability, or socioeconomic status may be socially constructed, incompletely recorded, or legally protected; their use should have a clear purpose and governance approval.

Automated EDA tools can rapidly generate summaries, but they may choose misleading defaults, hide missingness, or encourage spurious pattern discovery. Reproducible code, peer review, versioned data, and human interpretation remain necessary.

13. Best Practices and Contemporary Developments

Effective practice includes:

  • begin with the data-generating process, not with a favorite chart;
  • use plots and numerical summaries together;
  • report units, denominators, sample sizes, and missingness;
  • use robust summaries for skewed or contaminated data;
  • retain genuine rare events when they matter to the problem;
  • compare results under plausible cleaning and transformation choices;
  • separate exploratory analysis from final confirmatory claims;
  • make analyses reproducible through documented code and data provenance;
  • assess subgroup behavior and potential fairness risks;
  • use interactive dashboards carefully, preserving stable definitions and auditability.

Contemporary EDA increasingly incorporates automated profiling, interactive visual analytics, streaming data monitoring, and model-oriented diagnostics. In machine learning, exploratory analysis also includes checking label quality, train–test distribution shift, feature leakage, concept drift, and representation gaps. These developments increase analytical speed but do not eliminate the need for statistical reasoning.

Chapter Summary

Descriptive statistics summarize the location, spread, position, and shape of observed data. Appropriate summaries depend on measurement scale, distributional form, sample size, and purpose. Means are sensitive to extreme values, whereas medians and interquartile ranges are more robust. Variance and standard deviation quantify spread around the mean, while quantiles describe relative position.

EDA combines numerical summaries with visual displays to investigate distributions, missingness, outliers, associations, subgroups, and multivariate structure. Histograms, bar charts, box plots, scatterplots, contingency tables, pair plots, and dimension-reduction displays each answer different questions. Correlation describes linear association but does not establish causation. Outliers require investigation rather than automatic removal, and transformations should be justified by data characteristics and analytical goals.

For AI and ML, EDA is a foundation for reliable modeling. It helps detect leakage, inconsistent units, sampling problems, distribution shift, subgroup disparities, and data-quality failures. Ethical and professional analysis requires transparency, privacy protection, reproducibility, and careful distinction between exploratory patterns, predictive relationships, and causal conclusions.

Key Terms

Descriptive statistics: Numerical and graphical methods for summarizing observed data.

Exploratory data analysis: Systematic investigation of data structure, patterns, anomalies, and relationships.

Categorical variable: A variable whose values represent groups or categories.

Numerical variable: A variable representing quantities for which numerical operations are meaningful.

Nominal scale: A measurement scale with categories but no inherent order.

Ordinal scale: A measurement scale with ordered categories but not necessarily equal intervals.

Mean: The arithmetic average of numerical observations.

Median: The central ordered observation or the average of the two central observations.

Mode: The most frequently occurring value or category.

Variance: The average squared deviation, using a specified population or sample convention.

Standard deviation: The square root of variance, expressed in the original measurement units.

Quantile: A value marking a specified cumulative proportion of observations.

Interquartile range: The difference between the third and first quartiles.

Outlier: An observation unusually distant from other observations under a stated criterion.

Skewness: Asymmetry in the shape of a distribution.

Correlation: A standardized measure of association, commonly referring to linear association.

Transformation: A function applied to data to alter scale, shape, or analytical behavior.

Standardization: Centering and scaling a variable, commonly to mean zero and standard deviation one.

Data leakage: Use of information in model development that would not be available at the intended prediction time.

Multivariate analysis: Analysis involving several variables jointly.

Review Questions

Short Answer Questions

1. Distinguish nominal, ordinal, discrete, and continuous variables, giving one example of each.

2. Why is the median generally more resistant to extreme values than the mean?

3. Define the interquartile range and explain what it measures.

4. Why does correlation not establish causation?

5. State two reasons why an apparent outlier should not be removed automatically.

Long Answer Questions

1. Explain how an analyst should choose numerical summaries and graphical displays for categorical, symmetric numerical, and strongly skewed data.

2. Describe the full workflow of an exploratory data analysis from defining the problem to communicating results.

3. Derive and interpret the sample variance and sample standard deviation, explaining the role of n − 1.

4. Discuss the benefits and limitations of logarithmic transformation and standardization.

5. Explain how missingness, subgroup analysis, and data leakage affect the reliability of an AI or ML project.

Analytical / Application Questions

1. A dataset contains the response times 8, 9, 10, 10, 11, 12, and 40 seconds. Calculate the mean and median, identify which is more representative of a typical response, and propose two investigations of the largest value.

2. A company reports that Plan A has 80 cancellations among 1,000 customers and Plan B has 100 cancellations among 2,000 customers. Calculate each cancellation percentage and explain why counts alone would be misleading.

3. An analyst finds a strong positive correlation between support contacts and customer churn. Design an EDA plan to determine whether the relationship may be confounded by service interruptions, plan type, region, or timing.

Multiple Choice Questions with Answers

Question 1

Which measure is generally most resistant to an extreme observation?

A. Mean

B. Median

C. Variance

D. Range

Correct Answer: B. Median

Question 2

For the values 2, 4, 6, 8, and 10, what is the arithmetic mean?

A. 5

B. 6

C. 7

D. 8

Correct Answer: B. 6

Question 3

What does the interquartile range measure?

A. The total distance between the minimum and maximum

B. The spread of the middle 50 percent of observations

C. The average squared deviation from the mean

D. The most frequent value

Correct Answer: B. The spread of the middle 50 percent of observations

Question 4

Which graph is most appropriate for displaying the distribution of one numerical variable?

A. Histogram

B. Pie chart of arbitrary codes

C. Contingency table only

D. Nominal bar chart only

Correct Answer: A. Histogram

Question 5

If a sample has mean 50 and sample standard deviation 5, what is the z-score of an observation equal to 60?

A. 0.5

B. 1

C. 2

D. 10

Correct Answer: C. 2

Question 6

Which statement about Pearson correlation is correct?

A. It proves that one variable causes another

B. It measures only categorical association

C. It describes the direction and strength of linear association

D. It is unaffected by outliers

Correct Answer: C. It describes the direction and strength of linear association

Question 7

Under the common IQR rule, which value is a potential upper outlier when Q1 = 10 and Q3 = 18?

A. 20

B. 25

C. 29

D. 30

Correct Answer: D. 30

Question 8

Why should denominators be considered when comparing cancellation counts across customer plans?

A. Counts always equal percentages

B. Groups may contain different numbers of customers

C. Denominators eliminate all sampling bias

D. Percentages cannot be calculated from counts

Correct Answer: B. Groups may contain different numbers of customers

Question 9

Which condition is required for the transformation y = log(x) in its ordinary real-valued form?

A. x must be negative

B. x must be zero

C. x must be positive

D. x must be an integer

Correct Answer: C. x must be positive

Question 10

What is data leakage in a predictive modeling workflow?

A. Random variation in a histogram

B. Using information unavailable at prediction time

C. Scaling a numerical feature

D. Plotting a categorical variable

Correct Answer: B. Using information unavailable at prediction time

Probability and Statistics
Chapter 2 of 15