nerdexam
SAS_Institute

A00-240 · Question #7

A financial services manager wants to assess the probability that certain clients will default on their Home Equity Line of Credit (HELOC). A former employee left the code listed below. proc…

The correct answer is A. data NEW_PROB; set SCORED_HELOC; p=1/(1+exp(-DEFAULT)); run; B. data NEW_PROB; set SCORED_HELOC; ODDS = exp(DEFAULT); p = ODDS / (1+ODDS); run. When proc score applies logistic regression parameters to new data, the output variable DEFAULT contains the linear predictor (log-odds): the raw sum β₀ + β₁x₁ + β₂x₂ + …, not a probability. To convert log-odds to a probability, you apply the inverse logit (sigmoid) function: p…

Logistic Regression

Question

A financial services manager wants to assess the probability that certain clients will default on their Home Equity Line of Credit (HELOC). A former employee left the code listed below. proc logistic data = MYDIR.HELOC des outest=MSG; model DEFAULT = amount job_code years_at_residence; run; proc score data = MYDIR.RECENT_HELOC out = SCORED_HELOC score = MSG type = parms; var Amount Job_code Years_at_residence; run; The training data set is named HELOC, while a similar data set of more recent clients is named RECENT_HELOC. Which SAS data steps will calculate the predicted probability of default on recent clients? (Choose two.)

Options

  • Adata NEW_PROB; set SCORED_HELOC; p=1/(1+exp(-DEFAULT)); run;
  • Bdata NEW_PROB; set SCORED_HELOC; ODDS = exp(DEFAULT); p = ODDS / (1+ODDS); run;
  • Cdata NEW_PROB; set SCORED_HELOC; p=(1+exp(DEFAULT))/exp(DEFAULT); run;
  • Ddata NEW_PROB; set SCORED_HELOC; p = DEFAULT / (1+DEFAULT); run;

How the community answered

(24 responses)
  • A
    83% (20)
  • C
    8% (2)
  • D
    8% (2)

Explanation

When proc score applies logistic regression parameters to new data, the output variable DEFAULT contains the linear predictor (log-odds): the raw sum β₀ + β₁x₁ + β₂x₂ + …, not a probability. To convert log-odds to a probability, you apply the inverse logit (sigmoid) function: p = 1 / (1 + exp(−x)). Option A applies this formula directly, and Option B is mathematically identical - dividing the odds exp(DEFAULT) by 1 + exp(DEFAULT) is an algebraic rearrangement of the same expression, so both correctly yield a value between 0 and 1.

Option C computes (1 + exp(DEFAULT)) / exp(DEFAULT), which simplifies to 1 + exp(−DEFAULT) - a value always greater than 1, making it an impossible probability. Option D treats DEFAULT as if it were already the odds (p = odds / (1 + odds)), but DEFAULT is the log-odds, not the odds themselves; the correct conversion of odds to probability requires first exponentiating, as done in B.

Memory tip: Think of it as two paths up the same mountain - A goes straight up with the sigmoid formula, B takes the scenic route through the odds first; both reach the same summit (valid probability). If your formula can ever exceed 1 or go below 0, it's wrong.

Topics

#logistic function#probability conversion#PROC SCORE#linear predictor

Community Discussion

No community discussion yet for this question.

Full A00-240 Practice