Learning Objectives

By the end of this chapter, you will be able to:

  • Define predictive analytics and state the single question it answers.
  • Group predictive techniques into regression, classification, time series, and machine learning and state when each fits.
  • Explain training, testing, and validation with a hold out set and a baseline.
  • Describe evaluation with accuracy, precision, recall, and error for forecasts.
  • Illustrate a predictive model and its business test with a Nepal example dated in BS 2081 with NPR.

From What Happened To What Will Happen

Predictive analytics uses past data to estimate the likelihood of a future outcome. It does not promise certainty. It produces a probability, a score, or a range that a manager can act on sooner than waiting to see.

If descriptive is the mirror, predictive is the forecast. A bank that only totals last month defaults reacts. A bank that scores each new applicant by default probability chooses, prices, and follows up differently.

flowchart TB
    HIST["Clean historical data\nWith target and features"] --> SPLIT["Split\nTrain and test"]
    SPLIT --> TECH
    subgraph TECH["Predictive techniques"]
        REG["Regression\nPredict amount"]
        CLASS["Classification\nPredict class"]
        TS["Time series\nPredict over time"]
        ML["Machine learning\nLearn patterns"]
    end
    TECH --> SCORE["Scored list\nProbability or forecast"]
    SCORE --> Q["What will happen"]
    style SCORE fill:#6a1b9a,color:#fff

Figure 2: Data is split so the test checks honesty

Grouped Techniques By Prediction Task

Group technique by what the business needs to predict, not by algorithm name.

Group Prediction task Typical method Data that helps Output When it fits
A. Value Predict a continuous amount, such as sales, price, or demand quantity Linear regression, time series with trend and seasonality Historical quantities plus driver features Point forecast with interval Forecast demand or revenue as a number
B. Class Predict a category, such as churn yes or no, fraud yes or no, pay on time or late Logistic regression, decision tree, random forest, simple rule score Behaviour counts in last 30 to 90 days, tenure, usage Probability and class at a threshold Targeted action where you can choose who to treat
C. Sequence Predict a series over time Moving average, exponential smoothing, seasonal decomposition Regular time stamped history, festival calendar Forecast curve by date Staffing, stock, and cash that follow a calendar
D. Learning engine Learn from many features with less hand coding Machine learning broadly, including A to C with auto tuning Large, reasonably clean feature set Tuned model with validated error When pattern is wide and interaction matters

A useful split for the exam: regression predicts value, classification predicts class, time series predicts value over time, machine learning is the broader engine that can do all three with learned features.

How A Model Is Built And Judged

  1. Define target narrowly. Not churn ever but churn within 60 days. Not sales next year but sales next 30 days.
  2. Choose features that are known at prediction time. Bills in last 90 days is allowed. Payment on the same future date is not.
  3. Split. Train on one part, test on a hold out part not seen during training.
  4. Compare to baseline. A naïve forecast of repeat last period or always predict the common class. Model must beat that simply.
  5. Judge on business error, not only statistical error. A 71 percent precise model that is explainable may beat a 74 percent precise model that staff cannot explain to a customer.
  6. Set threshold for action. A churn score of 0.6 may be the line where a Rs. 500 retention offer is expected to pay.

Metrics That Matter

Situation Main metric What good means Watch out
Forecast a number MAE or RMSE versus actual, plus interval Smaller error and interval that contains future Point forecast without range overstates certainty
Predict a class Precision: of flagged cases how many were true High precision means less wasted action Precision low means you chase many false alarms
Predict a class Recall: of all true cases how many were flagged High recall means you miss fewer risks High recall with low precision wastes effort
Tradeoff F1 or expected value with cost of action Balance that maximises net gain Accuracy alone can mislead when classes are imbalanced

Grouped Business Uses

Use Question Feature hint Action that follows a score
Churn prediction Who will leave in 30 to 60 days Recharge gap, data use fall, complaints last 30 days Retention offer, proactive visit
Fraud detection Is this transaction likely fraudulent Location jump, amount spike, device change Block and verify by call
Credit risk Likelihood of 30 day arrears Repayment regularity, days since last on time Price risk, ask for guarantor, tighten follow up
Demand forecasting Quantity needed per week Season, festival date, weather, price Purchase and staffing plan

Predictions are probabilities. A 0.35 churn probability does not mean the customer will leave, only that 35 of 100 similar customers did in the past. Value comes from sorting and from threshold where expected gain exceeds expected cost.

Worked Example: A Telecom Flags Churn And A Sweets Shop Forecasts Quantity, BS 2081

Churn score, Nepal Telecom style, Kartik 2081. A prepaid base in Province 2 is scored monthly. Features: recharge days since last top up, data MB in last 30 days, calls to care, and plan age. The model flags customers with probability above 0.60 as at risk. In Kartik 2081 it flags 1,800 of 24,000 active customers. The retention team can visit or call 600 this month at Rs. 180 per contact including time and transport.

Precision on last month hold out was 68 percent. That implies of 1,800 flagged about 1,224 are truly at risk. If contacted, 38 percent of truly at risk stay with an offer of Rs. 250 bonus data. Cost per save is then contact cost plus bonus, but only for those who would have left. The team therefore ranks flagged customers by probability and visits the top 600 first, where expected precision is higher, about 75 percent in the top slice, not the 68 percent average.

Demand quantity, sweets for Tihar, BS 2081. A sweets shop in Patan records kg of barfi sold for Tihar: 800, 880, 960, 1,040 over four years. Trend is about +80 kg per year. A simple linear forecast for year 5 is 1,120 kg. The shop sets a planning range of 1,080 to 1,160 and notes that a weak remittance year could shave 5 to 8 percent. The point is useful, the range is honest.

This pair shows both prediction groups: churn as class with probability, demand as value with trend and range.

Self-check

Try This Churn model in Kartik 2081 flags 1,800 customers. Baseline monthly churn in the base is 5 percent of 24,000. Model precision is 68 percent. Retention can contact 600 flagged customers. Contact cost Rs. 180 per person. Bonus offer Rs. 250 per person who would have churned and is contacted, assumed given to all 600 contacted for simplicity. 38 percent of truly at risk among those contacted stay if contacted. Compute (a) baseline churn count, (b) expected true at risk among 1,800 flags, (c) if the 600 contacted are the top ranked with precision 75 percent then expected true at risk among 600, (d) expected saves among those 600, (e) total contact and bonus cost for 600, and (f) cost per save.

Answers: (a) 24,000 × 0.05 = 1,200 customers. (b) 1,800 × 0.68 = 1,224. (c) 600 × 0.75 = 450. (d) 450 × 0.38 = 171 saves. (e) Contact 600 × 180 = Rs. 108,000. Bonus 600 × 250 = Rs. 150,000. Total Rs. 258,000. (f) 258,000 ÷ 171 = Rs. 1,508.77 per save. Compare to lifetime value per saved customer to decide threshold. Ranking by probability cuts cost per save versus contacting random flags.

Summary

Predictive analytics turns history into sorted risk and quantity. Value forecasts need intervals, class predictions need thresholds, and time forecasts need seasonal honesty. A model is only as good as its hold out test and its ability to be acted on within budget.

Key Takeaways

  • Predictive answers what will happen as probability or forecast, not as guarantee.
  • Regression predicts value, classification predicts class, time series predicts over time, machine learning is the engine.
  • Split train and test, beat a baseline, then set a threshold where gain exceeds cost.
  • Precision measures waste, recall measures miss, range measures honesty.
  • Top slice precision matters more than average precision when action budget is limited.

Exercises

Short answer

  1. Define predictive analytics and state two business questions it answers.
  2. Distinguish regression from classification with one example each.
  3. Why must the test set stay unseen during training.
  4. What is threshold and why set it by expected value.

Long answer

  1. Group predictive analytics into value, class, sequence, and learning engine. For class prediction explain precision and recall. Use the Kartik 2081 churn flags of 1,800 with 68 percent precision and top 600 at 75 percent to compute expected saves and cost per save at Rs. 180 contact and Rs. 250 bonus, and explain why ranking by probability improves economics.