nerdexam
SAS_Institute

A00-240 · Question #17

This question will ask you to provide missing code segments. A logistic regression model was fit on a data set where 40% of the outcomes were events (TARGET=1) and 60% were non-events (TARGET=0). The

The correct answer is B. X=.05, Y=10. Option B is correct because it correctly addresses both adjustments the analyst needs to make. The priorevent=.05 parameter tells SAS to recalibrate the predicted probabilities from the training sample's 40% event rate to the true deployment population's 5% event rate - this must

Logistic Regression

Question

This question will ask you to provide missing code segments. A logistic regression model was fit on a data set where 40% of the outcomes were events (TARGET=1) and 60% were non-events (TARGET=0). The analyst knows that the population where the model will be deployed has 5% events and 95% non-events. The analyst also knows that the company's profit margin for correctly targeted events is nine times higher than the company's loss for incorrectly targeted non-event. Given the following SAS program: proc logistic data = LOANS_descending; model Purch = Inc Edu; score data = LOANS_V$ out = LOANS_VS priorevent = (insert X here); run; data LOANS_VS; set LOANS_VS; Solicit = P_1 > (insert Y here); run; What X and Y values should be added to the program to correctly score the data?

Options

  • AX=40, Y=10
  • BX=.05, Y=10
  • CX=.05, Y=.40
  • DX=.10.Y=.05

How the community answered

(58 responses)
  • A
    19% (11)
  • B
    71% (41)
  • C
    7% (4)
  • D
    3% (2)

Explanation

Option B is correct because it correctly addresses both adjustments the analyst needs to make. The priorevent=.05 parameter tells SAS to recalibrate the predicted probabilities from the training sample's 40% event rate to the true deployment population's 5% event rate - this must be expressed as a decimal proportion, making X = .05. The cutoff Y is derived from the profit/loss ratio: since correctly targeting an event yields 9x more than the loss from a false positive, the optimal cutoff = Loss / (Loss + Profit) = 1 / (1 + 9) = 0.10, so any prospect with P_1 > .10 gets solicited.

Why the distractors fail:

  • A (X=40) uses a raw percentage (40) instead of a decimal for priorevent; SAS requires a proportion between 0 and 1.
  • C (Y=.40) confuses the training sample event rate (40%) with the optimal decision cutoff - these are completely different concepts.
  • D (X=.10) swaps the two values: .10 is the correct cutoff, not the prior, and .05 is the correct prior, not the cutoff.

Memory tip: Think of it as two separate questions - "Where is my population?" (prior = true deployment rate as decimal) and "Where should I draw the line?" (cutoff = 1 ÷ (1 + profit-to-loss ratio)). Mixing up which number goes where is exactly what distractors C and D are designed to exploit.

Topics

#Logistic Regression#Class Imbalance#Prior Probabilities#Threshold Selection

Community Discussion

No community discussion yet for this question.

Full A00-240 Practice