Maths IA · Modelling · topic 96 of 97
Who gets a loan? Logistic models for credit scoring · IB Maths IA idea: guide, sample graph and step-by-step plan
a curve decides who gets a loanA bank cannot know who will repay. It can only estimate a probability of default and choose where to draw the line. You're going to build that estimate, find the best line, and ask who it shuts out.
- ✓ you want a model where a curve makes a real decision about people
- ✓ you are comfortable with functions that are not straight lines, and with technology
- ✓ you want to discuss fairness as well as accuracy
The big idea
A probability must stay between 0 and 1, so a straight line is the wrong model for it. The logistic function fits: it is S-shaped, and its log-odds are a straight line in the predictor, such as a borrower's debt-to-income ratio. Fit it to data, and each applicant gets an estimated risk. Now put money in. A repaid loan earns a gain, a default loses much more, so a loan is worth making only when the risk is below a break-even level. Choosing that cut-off is an optimisation problem. The model is quick to build. The marks come from the judgement: how the data were collected, how the cut-off changes with the costs, what a mistake costs each group of applicants, and whether any model should decide this alone.
Make it yours: pick one twist
Copying a classic won't show your choices. Pick one of these (or invent your own) and your IA becomes yours.
Swipe for more twists →
Show that if p is logistic in x, then ln(p/(1 − p)) is a straight line, and use it to estimate the two parameters.
→ A rearrangement and a transformation of data. Say why a straight line fitted to p itself fails.Fit the logistic model to simulated or real default data using technology, and judge the fit.
→ Non-linear regression. Compare observed default rates in each band of x with the fitted curve.With a gain G for each repaid loan and a loss L for each default, find the risk level above which a loan loses money.
→ An optimisation with a clean answer. Derive p* = G/(G + L) and check it against a table of total profit for different cut-offs.Vary G and L, or add a fixed cost per application, and see how the best cut-off moves.
→ A sensitivity study. Plot the cut-off as a function of the loss-to-gain ratio and explain its shape.Split applicants into two groups and compare how many creditworthy people in each group are refused.
→ Two error rates for two groups. Show that one cut-off can treat the groups differently, and discuss what to do about it.Use a public default dataset, or simulate applicants from a known curve and see how well the fit recovers it.
→ Known truth versus noisy reality. A simulation lets you measure the error in your estimates exactly.Your Maths IA research question: run the check
which data? which costs?Write your own question first. Then make sure it ticks every box:
- Names the predictor or predictors and the outcome (default or not), and says where the data come from or how they are simulated.
- States the costs: the gain from a repaid loan and the loss from a default, with a reason for each.
- Says what you will choose or find: the fitted parameters, the best cut-off, or how the cut-off depends on the costs.
- Says how you will check the model: observed default rates against the fitted curve, in bands.
- Names a fairness or limits question you will address, and what you would need to measure.
The model
A logistic curve gives each applicant a default risk. A break-even line splits applicants into approve and decline. Sketch yours for your own predictor and costs.
How your Maths IA could be laid out
The usual order for a topic like this, what each part needs to show, and roughly how much of your 12 to 20 pages it takes. The words are all yours.
Why lenders score applicants, what data you use, and what you expect the curve and the cut-off to look like.
A line fitted to 0/1 outcomes, why it breaks, and the logistic function as a repair.
The function, its log-odds, what each parameter does to the curve, and a graph for several parameter values.
The fitted parameters, how you found them, and a check against observed default rates in bands.
Expected profit as a function of the cut-off, the derivation of the break-even risk, and a table to confirm it.
Two groups, two error rates, and what changes if you use a different cut-off for each.
Back to your aim: the model, the cut-off, and what you would and would not use it for.
Few predictors, data that only include approved borrowers, costs that are guesses. Say which limitation matters most.
Where every dataset, definition and idea came from.
What your Maths IA graph could look like
show the cut-off on the graphMade-up applicants to show the form of a strong graph, not the answer: observed default rates by band, with a fitted logistic curve. Yours will look different. example only
- The S-shape keeps every value between 0 and 1. A straight line would not.
- Axis labels give the predictor and what is measured: here a ratio and a probability.
- Plot observed rates in bands as points, with the band size stated, so the fit can be judged.
- Draw the break-even line on the same graph, so the cut-off can be read off.
- Another graph to consider: total profit against the cut-off, with the maximum marked.
The maths in action
worked through, not sketched!The graph above was a sketch with made-up numbers. This figure works the idea through from the model itself, so you can see what a finished figure looks like. The source line under it says where every number comes from.
Your game plan
Tick steps off as you go. We'll remember on this device.
0 of 10 done
- Read and predictFind out what a credit score is. Before any modelling, sketch how you expect default risk to change with a predictor such as debt-to-income ratio.
- Choose the dataUse a public default dataset, or simulate applicants from a curve you choose. Say what each column means and how defaults are defined.
- Why not a line?Fit a straight line to the 0/1 outcomes, show where it fails, then introduce the logistic function.
- Trial run (1 lesson)Plot logistic curves for a few parameter values, and use banded default rates to estimate the log-odds by eye.
- Fit the modelFit the parameters with technology. Compare fitted and observed rates in bands, and say how good the fit is.
- Set the costsDecide the gain from a repaid loan and the loss from a default, with a reason. Write the profit from one loan.
- Find the cut-offWork out total profit for a range of cut-offs, find the maximum, and derive the break-even risk.
- Go further, with a reasonTest fairness between two groups, or vary the costs. HL: this is where the rigour for criterion E comes from.
- Reflect as you goAfter every result, write one line on what it means in the real setting and what it assumes. These lines become your evaluation.
- Cut, check, then sendCheck every graph has labelled axes with units, every symbol is defined once and the conclusion answers your aim. Then send your teacher one draft.
The maths you'll use
- Logistic function – Study : its range, its S-shape and how move and steepen the curve.
- Log-odds and inverse functions – Show by inverting the function, and use it to estimate parameters.
- Regression with technology – Fit a logistic model to banded or individual default data and judge the fit with residuals or .
- Expected value and optimisation – Write the expected profit per loan , and the total profit for a cut-off; find where it is maximised.
- Sensitivity of the answer – Vary and and plot how the best cut-off moves.
Key equations
Syllabus links
- 2.9Exponential and logarithmic functions
- 4.7Discrete random variables and expected value
- 5.8Maxima, minima, inflexion and optimisation
- 2.9Logarithmic, logistic, piecewise and half-life modelsHL
- 2.10Log scales, linearising data, log-log and semi-log graphsHL
- 4.7Discrete random variables and expected value
- 4.13Non-linear regression, residuals and R-squaredHL
- 5.9Further derivatives; chain, product, quotient rules; related ratesHL
Read up first
Data and sources to start from
Simulate applicants from a chosen logistic curve (so the truth is known), or use a public credit-default dataset with one or two predictors.
References to cite
- Yeh, I.-C., & Lien, C.-H. (2009). The comparisons of data mining techniques for the predictive accuracy of probability of default of credit card clients. Expert Systems with Applications, 36(2), 2473-2480.
- Thomas, L. C., Edelman, D. B., & Crook, J. N. (2002). Credit scoring and its applications. SIAM.
- UC Irvine. (n.d.). UCI Machine Learning Repository. https://archive.ics.uci.edu/
Cite what you actually use, in your own format, and say where each number came from.
Traps to avoid in this Maths IA
a default costs more than a refusal- Fitting a straight line to 0/1 outcomes and reading its output as a probability.
- Choosing the cut-off to maximise accuracy, which ignores that a default costs much more than a refused good loan.
- Using data that only include people the bank already approved, so the model has never seen the risky ones.
- Judging the fit on the same data it was fitted to, with no bands and no held-back sample.
- Treating the costs as facts. They are assumptions, so test how the answer changes.
- Discussing fairness without defining it. Say which error rate you compare between groups.
More Maths IA ideas like this
Screening tests: why a positive can still be wrong●○○
Population: exponential or logistic for one country?●●○
How much should you bet or invest? The Kelly criterion●●○
Two shares or one? Diversification and portfolio risk●●○
This guide shows how a topic like this is usually approached. It is not an IA. Your question, choices, data, analysis and words must be your own: change something, tell your teacher where the idea came from, and follow your school's rules on outside help.