Statistics Technology & Digital Applications 5 — Questions and Answers
Question 1: A statistician uses Python's statsmodels library to fit an OLS regression and inspects the Durbin-Watson statistic. What assumption does this statistic test?
- Normality of residuals
- Homoscedasticity of residuals
- Independence of residuals (autocorrelation) (Correct answer)
- Multicollinearity of predictors
Correct answer: Independence of residuals (autocorrelation)
The Durbin-Watson statistic ranges from 0 to 4, with values near 2 indicating no autocorrelation among residuals.
Question 2: In Tableau, a 'dimension' field versus a 'measure' field differs primarily in that:
- Dimensions are always numeric; measures are categorical
- Dimensions are categorical/qualitative; measures are quantitative and aggregatable (Correct answer)
- Dimensions appear on the y-axis; measures on the x-axis
- Dimensions require sorting; measures do not
Correct answer: Dimensions are categorical/qualitative; measures are quantitative and aggregatable
Tableau classifies categorical fields used to slice data as dimensions, while numeric fields that are aggregated (sum, avg, etc.) are measures.
Question 3: Which Python library's function numpy.random.normal(loc=0, scale=1, size=1000) is used to generate?
- 1000 uniform random integers
- 1000 samples from a standard normal distribution (Correct answer)
- 1000 samples from a binomial distribution
- 1000 samples from a Poisson distribution
Correct answer: 1000 samples from a standard normal distribution
numpy.random.normal() generates random samples from a normal (Gaussian) distribution with specified mean (loc) and standard deviation (scale).
Question 4: A researcher uses Excel's VLOOKUP function to merge two datasets. What is a critical limitation of VLOOKUP?
- It cannot look up numeric values
- It can only search the leftmost column of the table array (Correct answer)
- It returns the entire row rather than one cell
- It requires the data to be sorted by the return column
Correct answer: It can only search the leftmost column of the table array
VLOOKUP always searches the first (leftmost) column of the lookup range, making it unable to return values from columns to the left of the lookup key.
Question 5: In SAS, the PROC FREQ procedure is primarily used for:
- Fitting linear regression models
- Generating frequency tables and chi-square tests for categorical data (Correct answer)
- Computing survival analysis estimates
- Producing ANOVA tables for continuous outcomes
Correct answer: Generating frequency tables and chi-square tests for categorical data
PROC FREQ produces frequency tables, cross-tabulations, and chi-square statistics for analyzing categorical variables in SAS.
Question 6: Which version control concept is most critical for a team of data scientists collaborating on the same R or Python analysis scripts?
- Database indexing
- Git branching and merging (Correct answer)
- CSV compression
- SQL normalization
Correct answer: Git branching and merging
Git branching allows team members to work on separate features or analyses simultaneously and merge changes without overwriting each other's work.
Question 7: A statistician uses the sklearn.preprocessing.StandardScaler in Python before running k-means clustering. What does StandardScaler do to the features?
- Converts features to binary (0 or 1)
- Transforms features to have mean 0 and standard deviation 1 (Correct answer)
- Removes outliers from each feature
- Applies log transformation to skewed features
Correct answer: Transforms features to have mean 0 and standard deviation 1
StandardScaler standardizes features by subtracting the mean and dividing by the standard deviation, producing z-scores with mean 0 and std 1.
A statistician uses Python's statsmodels library to fit an OLS regression and inspects the Durbin-Watson statistic.
What assumption does this statistic test?