Last checked
You need five ideas: mean versus median, spread, sampling, the A/B test, and Bayes for rare events. Each fits on one page and needs only school arithmetic. Skip proofs and learn each idea through one small example before you touch a library.
McTaba runs coding and data bootcamps in Kenya. This guide is written to be useful whether or not you ever join one.
Imagine a statistics lecture that starts with a coin toss and ends in a wall of Greek letters. You do not need that wall. A working analyst reaches for five ideas again and again, and this page shows each on a small example you can redo with a pen. For the larger picture, see our data science career map for Kenya.
| Idea | The question it answers | Kenyan picture |
|---|---|---|
| Mean and median | What is typical? | Salaries in a small company |
| Spread | How much does it vary? | Daily sales at one stall |
| Sampling | Can I trust a small group? | Surveying 200 shoppers |
| A/B test | Did the change work? | Two versions of a USSD menu |
| Bayes | How likely is it, given the alert? | A fraud alert on M-Pesa style data |
If you want these taught alongside code, with weekly feedback, the Data Science to AI Engineering programme covers them in its maths and statistics phase, with Bayes for fraud alerts and A/B testing. No coding, data or maths background needed.
For example, imagine nine staff at a small Nairobi firm, with made-up monthly salaries in thousands of shillings: 35, 38, 40, 42, 45, 48, 50, 52 and 400. The 400 is the owner.
Eight of nine people earn less than the mean. The mean got pulled by one big number. The median stays close to what most people take home. When data has a long tail, as incomes, prices and mobile money transfers do, report the median first.
Now spread. Two stalls can both sell a median of 5,000 shillings a day. One sells between 4,500 and 5,500 every day. The other swings between 500 and 12,000. You would plan stock very differently. Three simple measures of spread:
In pandas, df["amount"].describe() prints all of these in one go. The first week of learning Python for data science gets you to that line.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
Imagine you ask 200 shoppers at one Westlands supermarket what they pay for mobile data. Does the answer describe Kenya? No. It describes shoppers at that supermarket on that day.
A sample speaks for a population only if it was chosen fairly. Three questions to ask every time:
The same warning applies to your own data. A table of M-Pesa transactions holds only the people who used M-Pesa. Before you generalise, write down who is missing.
For example, imagine a savings service with a USSD menu. Version A asks for the amount first. Version B asks for the phone number first. You send each version to 1,000 made-up users.
B is 4.5 percentage points ahead. Is that real, or luck? The standard error of the difference is about 2.1 points (work: the square root of 0.30 x 0.70 / 1,000 plus 0.345 x 0.655 / 1,000). The gap divided by the standard error is about 2.2. A gap above 2 is unlikely to be luck alone, so luck alone would produce it about 3 times in 100.
Put it in plain words for the product owner: "B probably finishes more deposits. The true gain is likely between 0.4 and 8.6 points. Ship B, and keep watching."
The result then has to reach a person who decides. Data storytelling shows how to write that one page.
This one surprises people. For example, imagine a bank flags suspicious transfers. Made-up numbers: 1 in 100 transfers is fraud. The alert catches 90% of fraud. It also wrongly flags 5% of honest transfers.
Take 10,000 transfers.
For example, of those 585 alerts, only 90 are fraud, about 15 in every 100. An alert that "catches 90% of fraud" is wrong about five times in six when it fires.
That is Bayes' rule without the formula. Start from how rare the thing is, then update with the evidence. Two lessons follow. For rare events, accuracy figures mislead. And an alert team needs a cheap way to clear false alarms, or it will drown. The fraud topic gets its own build in our guide to mobile money fraud detection with machine learning.
No maths degree is needed for any of this, and no school can promise a job from it. It is the thinking that lets you say "I am not sure yet" in a meeting, and mean it. The Data Science to AI Engineering programme starts on 11 January 2027 and costs KES 140,000.
KES 140,000
Data Science to AI Engineering: 5 months full time or 8 months part time, hybrid in Nairobi. Fraud, credit and M-Pesa data from Week 1, and every model deployed. Starts 11 January 2027.
See the Data Science programme