Statistics for Data Science
- 87Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
How does a traditional statistical approach differ from a typical machine-learning approach in how it begins an analysis?
87 questions
- 1
How does a traditional statistical approach differ from a typical machine-learning approach in how it begins an analysis?
Model answer
Statistics typically starts with a question and then gathers data to answer it. Machine learning often starts with available data and asks what patterns or information it contains.
Explanation
The statistical approach is described as problem-first and data-next; the machine-learning approach is often data-first.
- 2
Why can an analyst and a business interviewer misunderstand each other when discussing a dataset?
Model answer
The interviewer may expect the analyst to discover useful findings from the data, while the analyst may first ask what question the business needs answered.
Explanation
The two approaches place different emphasis on finding the question and collecting or analyzing the data.
- 3
In the contrast presented between statistics and machine learning, which is described as expensive in each approach: the question or the data?
Model answer
In the statistical approach, the question is described as expensive and the data as relatively cheap; in the machine-learning approach, the question is cheap and the data is expensive.
Explanation
The contrast concerns whether the work focuses more on formulating the right question or obtaining and analyzing data.
- 4
A watch company notices that sales are falling. Give two specific questions it could ask of its own data before deciding what to do.
Model answer
It could ask which customer segments have the steepest sales declines and how sales vary by region, age group, or year.
Explanation
The content emphasizes turning a broad business problem into specific, answerable questions about sales and customers.
- 5
What is descriptive analytics intended to do?
Model answer
It summarizes or describes what is present in the data, such as where and when sales are declining, without itself predicting or prescribing an action.
Explanation
Descriptive analytics locates and characterizes a problem rather than explaining what will happen or what should be done.
- 6
What distinguishes predictive analytics from descriptive analytics?
Model answer
Predictive analytics uses data to estimate what may happen or what would happen if conditions changed, whereas descriptive analytics reports what the data shows.
Explanation
For example, estimating how sales might respond to a price change is predictive rather than merely descriptive.
- 7
What does prescriptive analytics add to predictive analytics?
Model answer
Prescriptive analytics recommends an action that seeks to achieve an objective while satisfying relevant constraints.
Explanation
A prediction estimates an outcome; a prescription uses that information to choose an action.
- 8
Why is prescribing a business action often a complex optimization problem?
Model answer
A business may need to balance competing goals, such as increasing sales while maintaining profits, retaining employees, and meeting financial obligations.
Explanation
An action that improves one measure can worsen another, so the prescription must account for multiple requirements.
- 9
Using the cricket example, distinguish a descriptive, predictive, and prescriptive question.
Model answer
Descriptive: How many centuries has a player scored? Predictive: How many might the player score in a tournament? Prescriptive: What could be done to help the player score more?
Explanation
The questions progress from summarizing past data to forecasting and then recommending action.
- 10
Why can descriptive analytics still be difficult even though it does not make predictions?
Model answer
The analyst must decide which parts of a large, complex dataset are relevant to the question and how best to summarize them.
Explanation
Selecting meaningful measurements from a much larger set of possible observations requires judgment and skill.
- 11
What is a random variable, and why might blood content be treated as one?
Model answer
A random variable is a quantity whose value can vary. Blood content varies with factors such as time, food, and the body's changing energy needs.
Explanation
The same person's blood does not necessarily have an identical composition at every moment or sampling location.
- 12
Why might two blood samples from the same person differ even if collected at nearly the same time?
Model answer
Blood can differ across locations in the body and vary over time, so separate samples need not have identical contents.
Explanation
The content describes both temporal variation and possible differences between sampling locations.
- 13
Why might a single measurement be an inadequate basis for deciding whether a value exceeds a threshold?
Model answer
A single reading may be affected by variation or measurement error, so it may not represent the underlying level reliably.
Explanation
Repeated readings or a range can reveal whether a value is consistently near or beyond a threshold.
- 14
How can analysts handle uncertainty around a threshold such as a medical cutoff?
Model answer
They can treat the cutoff as a range rather than a perfectly sharp boundary, or take additional measurements to assess variation in the observed value.
Explanation
The content describes adjusting the boundary using fuzzy logic or accounting for uncertainty around the reading itself.
- 15
Why do reports sometimes give a range or recommend repeating a measurement instead of providing one definitive number?
Model answer
A range can represent natural variability, and repeating a measurement can help assess whether a single result is reliable.
Explanation
One number compared with one threshold gives little information about how much the result may vary.
- 16
What is the difference between a numerical variable and a categorical variable?
Model answer
A numerical variable represents quantities on which arithmetic summaries can make sense; a categorical variable identifies groups or labels, such as gender or product type.
Explanation
A mean can be calculated for numerical values, but it is not meaningful to average labels such as male and female.
- 17
How do nominal and ordinal categorical variables differ?
Model answer
Nominal categories are names with no inherent order, while ordinal categories have a meaningful order, such as fitness ratings from poor to excellent.
Explanation
Both are categorical, but ordinal categories encode relative ranking.
- 18
Why should a ZIP code not be treated as an ordinary numerical measurement?
Model answer
A ZIP code is an identifier, not a quantity; arithmetic such as averaging two ZIP codes does not produce a meaningful location.
Explanation
Although stored as digits, ZIP codes function as categorical labels.
- 19
A customer rates fitness on a scale from one to five. Why might software treat this variable as numerical even though an analyst might treat it as categorical?
Model answer
The values are entered as numbers, so software may recognize them as numerical; an analyst may instead treat the ordered ratings as ordinal categories.
Explanation
The stored format and the conceptual meaning of a variable do not always match.
- 20
What does a five-number summary report, and what can it reveal?
Model answer
It reports the minimum, first quartile, median, third quartile, and maximum. Together, these values summarize location and spread and can indicate asymmetry.
Explanation
The five points divide the ordered data into four sections, each containing roughly one quarter of the observations.
- 21
What does the median represent, and how is it found?
Model answer
The median is the middle value after observations are sorted. With an even number of observations, it is the average of the two central values.
Explanation
The median divides the ordered observations into two halves.
- 22
How is the mean calculated, and how does it differ conceptually from the median?
Model answer
The mean is the sum of all observations divided by their number. Unlike the median, it is the balance point of the values and can shift substantially when extreme values are added.
Explanation
The mean uses every value directly, while the median is determined by the middle position in the sorted data.
- 23
Why can the mean and median be different for the same dataset?
Model answer
They measure different aspects of the data: the mean is sensitive to the size of all values, while the median depends on their ordering and middle position.
Explanation
Values far from the center can pull the mean without greatly changing the median.
- 24
What does it suggest when the mean is greater than the median?
Model answer
It often suggests right skew: some relatively large values extend the distribution toward the right and pull the mean upward.
Explanation
The mean is more affected than the median by values far out in the upper tail.
- 25
How do the mean and median behave differently when a very high-income person is added to a group?
Model answer
The mean can rise substantially, while the median usually changes little because the middle-ranked person or pair is likely to remain similar.
Explanation
This illustrates the mean's sensitivity and the median's relative resistance to extreme values.
- 26
What is the mode, and why can it be difficult to calculate for continuous numerical data?
Model answer
The mode is the most frequent value or peak of a distribution. For continuous data, its estimate may depend on how values are grouped into histogram bins.
Explanation
Changing the bin width or boundaries can change which interval appears most frequent.
- 27
Define the range and the interquartile range.
Model answer
The range is the maximum minus the minimum. The interquartile range is the third quartile minus the first quartile and covers the middle half of the observations.
Explanation
Both summarize spread, but the interquartile range focuses on the central portion of the data.
- 28
What does standard deviation measure, and why are deviations from the mean squared when calculating it?
Model answer
Standard deviation measures the typical spread of observations around the mean. Squaring makes both positive and negative deviations contribute positively instead of canceling each other.
Explanation
The square root at the end returns the measure to the original units after deviations have been squared and averaged.
- 29
How does mean absolute deviation differ from standard deviation?
Model answer
Mean absolute deviation averages the absolute distances from the mean instead of squared distances; it does not require taking a square root afterward and is less affected by extreme deviations.
Explanation
Squaring makes large deviations grow especially rapidly, increasing standard deviation's sensitivity to outliers.
- 30
What is the difference between a data summary and a data-information summary from software?
Model answer
A statistical summary reports properties such as means, quartiles, or counts; a data-information summary reports structural details such as variable types and missing or non-null entries.
Explanation
A structural description of a data frame is not the same as a statistical description of its values.
- 31
What does a histogram show, and how can its appearance be affected by bin choices?
Model answer
A histogram groups observations into intervals and displays the count in each interval. Changing the number or width of bins can change the apparent shape.
Explanation
Histograms are useful visual summaries of distributions, but their details depend partly on the chosen binning.
- 32
What information is shown by a standard box plot?
Model answer
The box spans the first to the third quartile, with a line at the median; whiskers extend toward the non-outlying data, and points beyond them may be shown separately.
Explanation
The box represents the middle half of the observations, and the whiskers and separate points summarize the remaining spread.
- 33
Under the box-plot convention described, how is an outlier identified?
Model answer
A point is marked as an outlier if it lies beyond a whisker set at 1.5 times the interquartile range from the box.
Explanation
The whisker rule is a convention for flagging unusually distant points, not proof that a value is erroneous.
- 34
What is a cross-tabulation used for, and what kind of variables does it summarize?
Model answer
A cross-tabulation counts observations for combinations of categories, making it useful for comparing categorical variables such as product type and gender.
Explanation
It organizes counts by category rather than summarizing numerical measurements with a mean or box plot.
- 35
What is univariate analysis, and how may a pair plot display it?
Model answer
Univariate analysis examines one variable at a time. In a pair plot, a diagonal panel may show that variable's distribution as a histogram.
Explanation
The diagonal summarizes each variable individually, while off-diagonal panels compare pairs of variables.
- 36
Why are the two off-diagonal plots for a pair of variables mirror images of one another?
Model answer
They display the same pairwise relationship with the variables assigned to opposite axes, so one plot is a reflection of the other.
Explanation
For example, plotting age against education and education against age reverses the axis roles.
- 37
What is the difference between a histogram and a distribution estimate intended to represent a broader population?
Model answer
A histogram summarizes the observed sample using bins, whereas a smoothed distribution estimate attempts to represent the underlying distribution from which samples may be drawn.
Explanation
The underlying distribution is used to reason about similar future or unobserved groups, not just the particular sample.
- 38
Why is a sample distribution not automatically identical to the underlying population distribution?
Model answer
A sample contains only some observations, so its shape varies by chance and may not reproduce the population's distribution exactly.
Explanation
Statistical inference seeks to distinguish patterns that generalize from variation specific to the observed sample.
- 39
What is statistical inference trying to accomplish when it uses a sample?
Model answer
It uses sample information to draw conclusions about an underlying population or future observations while accounting for uncertainty due to sampling.
Explanation
The goal is to learn beyond the particular observations collected.
- 40
What is a probability distribution in the sense of the cumulative distribution function?
Model answer
A cumulative distribution function at a value gives the probability that the random variable is less than or equal to that value.
Explanation
It summarizes accumulated probability up to each point.
- 41
How are a cumulative distribution function and a probability density related for a continuous variable?
Model answer
The cumulative distribution function accumulates the density up to a value; conversely, the density is the derivative of the cumulative distribution function when that derivative exists.
Explanation
Probabilities over intervals correspond to areas under the density curve.
- 42
What does a density curve communicate that a single sample histogram does not directly establish?
Model answer
A density curve represents a model or estimate of the underlying distribution, which can be used to reason about other samples; a histogram directly summarizes the observed sample.
Explanation
A density estimate is an attempt to abstract the persistent pattern from sample-specific variation.
- 43
How can the amount of data and the desired confidence affect an uncertainty interval around an estimate?
Model answer
More observations generally make an estimate more precise, while demanding greater confidence generally requires a wider interval.
Explanation
The uncertainty also depends on how variable the data are.
- 44
Why may analysts collect data more frequently after a new product is launched or a major change occurs?
Model answer
The new situation may have an unfamiliar distribution and high uncertainty, so frequent data collection helps reveal how the outcomes are behaving.
Explanation
When conditions change, older patterns may not adequately describe the new situation.
- 45
Why is representativeness important when using a sample to describe a broader population?
Model answer
The sample must cover relevant kinds of cases; otherwise, its patterns may not apply to the wider population or future observations.
Explanation
A sample that omits important situations can provide a distorted picture of the underlying distribution.
- 46
Why do analysts sometimes use an industry-standard distribution even when a particular dataset does not fit it perfectly?
Model answer
A standard distribution can make analysis and comparison easier and may have a history of practical usefulness, though a poor assumption can weaken the conclusions.
Explanation
Models rely on assumptions; their usefulness depends on how well those assumptions suit the problem.
- 47
What is covariance, and what does its sign indicate?
Model answer
Covariance measures whether two variables tend to vary together. A positive value indicates movement in the same direction, and a negative value indicates movement in opposite directions.
Explanation
Covariance is based on the products of each observation's deviations from the two variables' means.
- 48
How is variance related to covariance and standard deviation?
Model answer
The variance of a variable is its covariance with itself, and standard deviation is the square root of the variance.
Explanation
Variance measures spread in squared units; standard deviation returns spread to the variable's original units.
- 49
Why can the magnitude of covariance be difficult to interpret across different measurement units?
Model answer
Covariance depends on the units of both variables, so changing a measurement scale changes its numerical value.
Explanation
Standardizing covariance by the variables' standard deviations produces a unitless correlation.
- 50
What does correlation measure, and what is its range?
Model answer
Correlation measures the direction and strength of a linear relationship between two variables, and it ranges from β1 to 1.
Explanation
Values near 1 indicate a strong positive linear relationship; values near β1 indicate a strong negative linear relationship.
- 51
What does a correlation near zero mean, and what does it not necessarily mean?
Model answer
It indicates little linear association, but it does not prove that the variables are unrelated; a nonlinear relationship may still exist.
Explanation
Positive and negative parts of a more complicated relationship can cancel when summarized by linear correlation.
- 52
Why does correlation not establish that one variable causes another?
Model answer
Correlation is a symmetric summary of association and does not specify a causal direction or rule out other explanations.
Explanation
The correlation of X with Y is the same as that of Y with X; causation requires additional reasoning or evidence.
- 53
What is a heat map used for when examining correlations?
Model answer
A heat map uses color to display correlation values, helping reveal patterns across many variables without requiring readers to inspect every number individually.
Explanation
It is a visual alternative to a correlation matrix, particularly useful for larger sets of variables.
- 54
What is the purpose of a linear regression model with one output and several inputs?
Model answer
It summarizes the relationship between an output variable and one or more input variables using an equation, and it can also be used for prediction or action planning.
Explanation
Its interpretation depends on how it is being used; a fitted relationship alone does not establish causation.
- 55
In a linear regression equation, how should a slope be interpreted descriptively?
Model answer
It describes the model's change in the predicted output associated with a one-unit increase in that input, holding other inputs fixed.
Explanation
For a model with multiple inputs, this interpretation concerns one coefficient at a time while the other inputs remain unchanged.
- 56
How does the least-squares method choose a regression line?
Model answer
It chooses the line whose sum of squared differences between observed and predicted outputs is as small as possible.
Explanation
Squaring prevents positive and negative residuals from canceling and makes large errors count more heavily.
- 57
Why is an intercept in a regression model not always meaningful in the real-world context?
Model answer
The intercept describes the predicted output when all inputs equal zero, but zero values may be impossible or outside the range relevant to the data.
Explanation
An equation can use an intercept to position its fitted line even when that particular scenario has no practical interpretation.
- 58
How does the meaning of forecasting differ from prediction in the terminology described?
Model answer
Forecasting usually refers to estimating future outcomes over time, while prediction can mean estimating an output from inputs without a time element.
Explanation
The terms overlap in everyday language but are often used differently in analytics contexts.
- 59
What is price elasticity of demand, and why may analysts relate log sales to log price?
Model answer
Price elasticity describes the percentage change in demand associated with a percentage change in price. Relating log sales to log price can express the relationship in percentage terms rather than units that depend on measurement scales.
Explanation
The resulting slope can summarize how sensitive sales are to price changes.
- 60
What is the difference between an experimental study and an observational study?
Model answer
In an experimental study, the researcher designs or controls the conditions; in an observational study, the researcher records outcomes without controlling how the data are generated.
Explanation
Many business analyses use observational data because it is already being generated in the world.
- 61
What are an experiment, an outcome, and a sample space in probability?
Model answer
An experiment is a process whose outcomes are observed; an outcome is one result of that process; the sample space is the set of all possible outcomes.
Explanation
These concepts define what probability statements refer to.
- 62
What is the difference between mutually exclusive events and independent events?
Model answer
Mutually exclusive events cannot occur together. Independent events can occur together, and knowing that one occurred does not change the probability of the other.
Explanation
Disjoint events are generally not independent when either event has a nonzero probability.
- 63
When can the probabilities of two events be added to find the probability that either occurs?
Model answer
They can be added directly when the events are mutually exclusive; otherwise, the probability of their overlap must be subtracted once.
Explanation
In general, P(AΒ orΒ B)=P(A)+P(B)βP(AΒ andΒ B).
- 64
When can probabilities be multiplied to find the probability that two events both occur?
Model answer
For independent events, multiply their probabilities. More generally, multiply the probability of the first event by the conditional probability of the second given the first.
Explanation
The general rule is P(AΒ andΒ B)=P(A)P(Bβ£A).
- 65
What does conditional probability express?
Model answer
It expresses the probability of an event when another event is known to have occurred, calculated as the probability of both events divided by the probability of the conditioning event.
Explanation
For events A and B, P(Aβ£B)=P(AΒ andΒ B)/P(B) when P(B)>0.
- 66
How does drawing cards without replacement affect the probability of drawing two spades compared with drawing with replacement?
Model answer
Without replacement, drawing a spade first leaves fewer spades among the remaining cards, so the second draw's probability changes. With replacement, the deck is restored and the draws are independent.
Explanation
The second draw depends on the first when the first card is not returned.
- 67
How does Bayes' theorem help when the probability needed is difficult to estimate directly?
Model answer
It reverses a conditional probability by combining the probability of evidence given a hypothesis with the prior probability of that hypothesis and the probability of the evidence.
Explanation
It can turn information such as word frequencies in spam into an estimate of the probability that a message is spam given its words.
- 68
In Bayesian terminology, what is a prior and what is a posterior?
Model answer
A prior is the probability assigned to a hypothesis before considering new evidence; a posterior is the updated probability after the evidence is considered.
Explanation
Bayes' theorem updates the prior using how likely the observed evidence is under the hypothesis.
- 69
Why can a highly accurate medical test still produce a positive result that does not imply a high probability of having the disease?
Model answer
If the disease is rare, the much larger number of people without it can produce many false positives, even when the false-positive rate is small.
Explanation
The probability of disease given a positive test depends on the disease prevalence as well as the test's sensitivity and specificity.
- 70
Why might a positive medical test be followed by a second test?
Model answer
A second, sufficiently independent test can reduce the chance that the same false-positive result occurs twice, increasing confidence in the conclusion.
Explanation
The benefit depends on the tests' errors being sufficiently independent; repeating the same procedure under identical conditions may not provide the same benefit.
- 71
What is the binomial distribution used to model?
Model answer
It models the number of successes in a fixed number of independent trials when each trial has the same probability of success.
Explanation
Examples include counting defective products in a fixed batch or customers who pay on time in a selected group.
- 72
What do the terms in the binomial probability formula represent?
Model answer
For n trials and success probability p, the probability of x successes is (xnβ)px(1βp)nβx. The combination counts possible arrangements, and the powers give the probabilities of successes and failures.
Explanation
The formula assumes a fixed number of trials, the same success probability on each trial, and independence among trials.
- 73
A binomial experiment has seven trials, each with a success probability of 0.6. What values can the number of successes take?
Model answer
It can take any integer value from 0 through 7.
Explanation
The number of successes cannot be negative or exceed the number of trials.
- 74
What are the mean and variance of a binomial distribution?
Model answer
For n trials with success probability p, the mean is np and the variance is np(1βp).
Explanation
The mean gives the expected number of successes; the variance describes the distribution's spread.
- 75
When is a Poisson distribution useful, and how does its setup differ from the binomial distribution?
Model answer
It is useful for counting events in a specified interval when there is no fixed maximum number of possible events. Unlike the binomial model, it is parameterized by an event rate rather than a fixed trial count and success probability.
Explanation
Examples include counting customer arrivals or defects over a period or in an area.
- 76
What does the parameter in a Poisson distribution represent?
Model answer
The parameter represents the average event count, or rate, for the interval being modeled.
Explanation
It determines the distribution of possible counts over that interval.
- 77
What is the normal distribution, and what information is specified by its two main parameters?
Model answer
The normal distribution is a symmetric, bell-shaped distribution specified by its mean and standard deviation.
Explanation
The mean determines its center, and the standard deviation determines its spread.
- 78
Under a normal-distribution model, approximately what proportions of observations lie within one, two, and three standard deviations of the mean?
Model answer
Approximately 68% lie within one standard deviation, 95% within two, and 99.7% within three.
Explanation
These approximate proportions help interpret a normal model's center and spread.
- 79
How do you use a cumulative distribution function to find the probability that a normally distributed value exceeds a threshold?
Model answer
Subtract the cumulative probability at the threshold from 1.
Explanation
The cumulative distribution function gives the probability of being at or below the threshold, so its complement gives the probability of being above it.
- 80
How can you find the probability that a normally distributed value falls between two thresholds?
Model answer
Subtract the cumulative probability at the lower threshold from the cumulative probability at the upper threshold.
Explanation
The difference gives the probability mass between the two values.
- 81
Why is the normal distribution often used to model totals or averages of many contributing factors?
Model answer
The central limit theorem explains why sums or averages of many contributions can have an approximately normal distribution under suitable conditions.
Explanation
This provides a reason for normal approximations, though it does not imply that every raw dataset is normally distributed.
- 82
Why is assuming a normal distribution not automatically justified just because a dataset is large?
Model answer
A large sample does not guarantee that the underlying data distribution is normal; the appropriateness of the assumption depends on the data-generating process and the quantity being modeled.
Explanation
A normal approximation may be more appropriate for totals or averages than for a strongly skewed raw variable.
- 83
How does the central limit theorem relate to sampling variability?
Model answer
It explains why averages or sums from repeated samples can have an approximately normal distribution, even when the individual observations are not normally distributed, under suitable conditions.
Explanation
This helps describe the variability of estimates calculated from samples.
- 84
Why can two identical sets of input characteristics lead to different observed outcomes in real-world learning problems?
Model answer
Outcomes may be affected by unobserved factors or randomness, so the observed relationship is not always a deterministic mapping from inputs to outputs.
Explanation
A probabilistic model can express uncertainty about possible outcomes rather than forcing a single certain answer.
- 85
What is the purpose of separating training data from validation or test data?
Model answer
Training data is used to fit the model, while held-out data is used to assess how well it performs on observations it did not use for fitting.
Explanation
Performance on unseen data gives evidence about whether a model generalizes beyond its training examples.
- 86
Why might a learning system report a probability rather than a definite yes-or-no answer?
Model answer
A probability communicates uncertainty among possible outcomes, allowing a person or system to make a decision using the consequences and risks involved.
Explanation
For example, a model may estimate the chance of a collision while a decision rule determines whether the vehicle should stop.
- 87
What role does a loss or objective function play in training a machine-learning algorithm?
Model answer
It measures how far predictions are from desired outcomes and gives the learning procedure a target to minimize or otherwise optimize.
Explanation
An algorithm needs a criterion for determining whether its predictions are improving.

Ask anything
We've read this whole study set, so questions about it get the best answers.