Business Analysis Statistics Test #1 — Questions and Answers
Question 1: A linear regression's usual formula is Y= beta0+beta1*X+error. Which phrase best encapsulates the presumptions made about the mistakes?
- The errors are independent, normally distributed with constant mean and zero variance.
- The errors are correlated, normally distributed with zero mean and constant variance.
- The errors are independent, normally distributed with zero mean and constant variance. (Correct answer)
- The errors are correlated, normally distributed with constant mean and zero variance.
Correct answer: The errors are independent, normally distributed with zero mean and constant variance.
In ordinary least squares (OLS) linear regression, several key assumptions are made about the error term (residuals). These include that the errors are independent, follow a normal distribution, have a mean of zero, and exhibit constant variance (homoscedasticity). These assumptions are crucial for the validity of hypothesis tests and confidence intervals derived from the regression model.
Question 2: Which SAS application will split the original data set into training and validation data sets stratified by county, each comprising 60% of the data?
- Proc surveryselect data=SASUSER.DATABASE samprate=0.6 out=sample;strata country;run;
- Proc sort data=SASUSER.DATABASE;by county;run;proc surveyselect data=SASUSER.DATABASE samprate=0.6 out=sample outall;strata county;run; (Correct answer)
- Proc sort data=SASUSER.DATABASE;by county;run;proc surveyselect data=SASUSER.DATABASE samprate=0.6 out=sample;strata county;eun;
- Proc sort data=SASUSER.DATABASE;by county;run;proc surveyselect data=SASUSER.DATABASE samprate=0.6 out=sample outall;run;
Correct answer: Proc sort data=SASUSER.DATABASE;by county;run;proc surveyselect data=SASUSER.DATABASE samprate=0.6 out=sample outall;strata county;run;
To perform stratified sampling in SAS, the data must first be sorted by the stratification variable, which in this case is 'county'. The `PROC SURVEYSELECT` procedure is then used to select a sample, with `samprate=0.6` indicating a 60% sample. The `strata county;` statement ensures that the sampling is done independently within each county, and `outall` creates an output dataset containing both selected and unselected observations, allowing for easy creation of training and validation sets.
Question 3: A logistic regression model's input variable, Region (A, B, or C), is investigated by an analyst. The analyst finds that when Region = A, the likelihood of purchasing a specific item is 1. What issue does this highlight?
- Problems that arise due to missing values
- Quasi-complete separation (Correct answer)
- Collinearity
- Influential observations
Correct answer: Quasi-complete separation
Quasi-complete separation occurs in logistic regression when a predictor variable or a combination of predictors perfectly predicts the outcome for a subset of observations. If the likelihood of purchasing an item is exactly 1 (or 0) for all observations in a specific region, it means that region perfectly predicts the outcome. This can lead to infinite maximum likelihood estimates for the regression coefficients, causing problems with model convergence and interpretation.
Question 4: The mean incomes of men and women employed by a corporation are compared by an analyst. Variables in the SAS data collection SALARY include: Gender (M or F) Pay (dollars per year) What SAS tools may be used to calculate the p-value when comparing the wages of men and women? (Select two.)
- Proc ttest data=salary;class gender;var pay;run; (Correct answer)
- Proc ttest data=salary;class gender;model pay=gender;run;
- Proc glm data=salary;class pay;model pay=gender;run;
- Proc glm data=salary;class gender;model pay=gender;run; (Correct answer)
Correct answer: Proc ttest data=salary;class gender;var pay;run;
Both `PROC TTEST` and `PROC GLM` (General Linear Model) can be used to compare the means of two groups. `PROC TTEST` is specifically designed for t-tests, directly comparing means between two classes (gender in this case) for a continuous variable (pay). `PROC GLM` is a more general procedure that can perform ANOVA, which for two groups is equivalent to a t-test, allowing comparison of means of 'pay' across 'gender' categories.
Question 5: Which statistic from a validation sample can be used to choose the model to employ for a binary target variable's prediction?
- Average Squared Error (Correct answer)
- Adjusted R Square
- Chi Square
- Mallow's Cp
Correct answer: Average Squared Error
For a binary target variable, the Average Squared Error (ASE) on a validation sample is a common and effective metric for model selection. ASE measures the average of the squared differences between the predicted probabilities and the actual binary outcomes (0 or 1). A lower ASE indicates better predictive accuracy, making it a suitable criterion for choosing the best model among candidates, especially when dealing with probabilities.
Question 6: Training, validation, and test data have been separated from the entire modeling data. Which data are most suitable for model evaluation?
- Test data
- Training data
- Total data
- Validation data (Correct answer)
Correct answer: Validation data
The validation data set is specifically used for tuning model hyperparameters and selecting the best model among several candidates. It provides an unbiased evaluation of a model's performance during the development phase, helping to prevent overfitting to the training data. The test data, on the other hand, is typically reserved for a final, single evaluation of the chosen model's generalization ability after all model selection and tuning are complete.
Question 7: Which statistic, when applied to a larger model, suggests a better model?
- Adjusted R Square (Correct answer)
- Mallow's Cp
- Average Squared Error
- Chi Square
Correct answer: Adjusted R Square
Adjusted R-squared is a modified version of R-squared that accounts for the number of predictors in a model. Unlike R-squared, which always increases with the addition of more predictors (even irrelevant ones), Adjusted R-squared only increases if the new predictor improves the model more than would be expected by chance. Therefore, a higher Adjusted R-squared generally indicates a better model, especially when comparing models with different numbers of independent variables.
Question 8: Which of the following best defines a pair of observations that are incongruent in the LOGISTIC process?
- There is an equal chance that one observation will be associated with the occurrence as another.
- In comparison to an observation without the event, an observation with the event has a higher projected probability.
- In comparison to an observation without the event, an observation with the event has a lower anticipated probability. (Correct answer)
- The anticipated probability for an observation with the event is the same as for an observation without the event.
Correct answer: In comparison to an observation without the event, an observation with the event has a lower anticipated probability.
In the context of logistic regression and concordance/discordance, a pair of observations is considered 'discordant' (incongruent) if, for a pair where one observation has the event (e.g., target=1) and the other does not (target=0), the model predicts a *lower* probability of the event for the observation that *actually had* the event. This indicates a misordering by the model, where it incorrectly assigns a higher probability to the non-event observation.
Question 9: This model has been chosen as the winner by an analyst since it outperforms a rival model with more predictors in terms of model fit. Which statistic supports this argument?
- R-Square
- Coeff Var
- Error DF
- Adj R-Sq (Correct answer)
Correct answer: Adj R-Sq
Adjusted R-squared (Adj R-Sq) is the appropriate statistic for comparing models with different numbers of predictors. Unlike R-squared, which always increases or stays the same with added predictors, Adj R-Sq penalizes the addition of unnecessary variables. This allows for a fair comparison, favoring simpler models that still maintain good fit and preventing selection of overly complex models.
Question 10: What is the best way to handle mean imputation when it is applied to data that has already been partitioned for an accurate assessment?
- The validation and test data sets are subjected to the sample means from the training data set. (Correct answer)
- Each data partition's sample means are applied to that particular partition.
- The training and validation data sets are adjusted using the sample means from the test data set.
- The training and test data sets are subjected to the sample means from the validation data set.
Correct answer: The validation and test data sets are subjected to the sample means from the training data set.
When performing mean imputation, it is crucial to calculate the sample means *only* from the training data set. These training data means are then applied to impute missing values in the validation and test sets. This approach prevents data leakage from the validation or test sets into the model building process, ensuring an unbiased and accurate assessment of the model's performance on unseen data.
Question 11: A financial services manager is attempting to determine the likelihood that specific customers will not pay off their home equity line of credit (HELOC). The code below was left by a previous employee. A similar data set of more recent clients is called RECENT HELOC, while the training data set is called HELOC. Which SAS data procedures will determine the anticipated likelihood of client default for recent clients? (Select two.) insert here>; data new prob; set scored heloc; run;
- P=default/(1+default);
- Odds=exp(default);p=odds/1+odds; (Correct answer)
- P=1/(1+exp(-default)); (Correct answer)
- P=(1+exp(default))/exp(default);
Correct answer: Odds=exp(default);p=odds/1+odds;
In logistic regression, the model typically outputs log-odds (represented by 'default' here). To convert these log-odds into a probability (P), two equivalent formulas can be used. Option B first converts log-odds to odds using `exp(default)` and then odds to probability using `odds/(1+odds)`. Option C directly converts log-odds to probability using the inverse logit function `1/(1+exp(-default))`, which is mathematically identical. Both methods correctly transform the log-odds into a probability of the event occurring.
A linear regression's usual formula is Y= beta0+beta1*X+error.
Which phrase best encapsulates the presumptions made about the mistakes?