Last checked
Expect four question types: SQL on transaction tables, statistics such as precision and recall, a case question on M-Pesa or loan data, and a take-home task. These are practice questions built from duties in real Kenyan job ads, not leaked interview papers. Each comes with a model answer below.
McTaba runs coding and data bootcamps in Kenya. This guide is written to be useful whether or not you ever join one.
We do not have interview transcripts from any named Kenyan employer, and we will not pretend to. What we do have is the duties those employers print in their job ads. Gulf African Bank lists fraud, churn and collections models. Pezesha lists repayment rates, portfolio at risk and days past due. Co-operative Bank lists model benchmarks, validation and fairness (Gulf African Bank, Pezesha, Co-operative Bank, all checked on 3 November 2026).
So we wrote the questions an interviewer would use to test those duties. Practise them aloud. For the full career picture, start with the data science career guide for Kenya.
For general interview prep, our knowledge base has SQL interview questions, Python interview questions and behavioural interview questions for Kenya. Want structured practice? The Data Science to AI Engineering programme builds these skills in sequence.
Assume a table txns(customer_id, txn_time, type, amount, status) that looks like an M-Pesa export.
Q1. Total sent per customer per month. Model answer: group by customer and month, filter the type first, and order the result.
SELECT customer_id,
date_trunc('month', txn_time) AS month,
SUM(amount) AS total_sent
FROM txns
WHERE type = 'send' AND status = 'completed'
GROUP BY customer_id, date_trunc('month', txn_time)
ORDER BY customer_id, month;
Say aloud why you filter in WHERE (before grouping) and not in HAVING. It shows you know the order of execution.
Q2. Customers with more than three failed transactions in a day. Model answer: group by customer and date, count failed rows, and filter the groups with HAVING.
SELECT customer_id, txn_time::date AS day, COUNT(*) AS failed
FROM txns
WHERE status = 'failed'
GROUP BY customer_id, txn_time::date
HAVING COUNT(*) > 3;
Q3. Each customer's second transaction. Model answer: use a window function, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY txn_time) in a subquery, then keep row 2. Mention that RANK would repeat on ties.
Q4. Portfolio at risk. Model answer: PAR30 is the outstanding balance of loans more than 30 days late, divided by the total outstanding balance. State the definition first, then write the query with a CASE expression. A careful candidate asks which balance counts (principal or principal plus interest) before writing a line.
More practice is in our SQL for data analysis guide.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
Q5. A fraud model scores ninety-nine out of a hundred on accuracy. Is it good? Model answer: not on its own. Fraud is rare, so a model that flags nothing can score that high. Ask for precision (of the alerts, how many were real) and recall (of the real fraud, how many we caught), and agree which error costs more. A blocked genuine payment annoys a customer. A missed fraud loses money.
Q6. What does "statistically significant" mean? Model answer: a result this extreme would be rare if nothing were going on, by a bar you set in advance (often one chance in twenty). It is not the chance the idea is true. Say it in one plain sentence, then give an example, for instance a new USSD menu and a change in completion rate.
Q7. Your credit model was trained only on people who got loans. What is wrong? Model answer: selection bias. You never saw how the rejected applicants would have repaid. Say how you would reduce it: a small random test group, or careful use of reject inference.
Q8. Overfitting. Model answer: the model memorised the training data. Show you can detect it, with a gap between training and test scores, and fix it with simpler models, more data or cross-validation.
Build the base in our statistics for data science guide.
A case question has no single right answer. The interviewer is watching how you think. Use the same five steps each time: clarify, define success, look at the data, propose a method, state the risks.
Case A. "Mobile money fraud has risen. How do you find it?" Model answer: clarify what counts as fraud and how fast alerts must fire. Success is more caught fraud with few blocked customers. Look at amounts, times, new devices and repeated small transfers. Start with simple rules, then a model such as gradient boosting, judged on precision and recall. Risks: rare labels, fraudsters changing tactics, and false alerts on genuine customers. We build one in our fraud detection guide.
Case B. "Should we lend to a boda boda rider with a six-month M-Pesa history?" Model answer: ask what the lender can legally use. Under the Data Protection Act 2019, personal data needs a lawful basis, such as the customer's consent for this use. Then show features: income regularity, balance floor, repayments on small loans. Compare with a simple baseline and check fairness across groups. Risk: six months is thin, so start with small limits.
Case C. "Repayments from our SACCO members dropped last quarter. Why?" Model answer: split the drop by member segment, branch, loan age and month, then check for data changes (a new system, a late file) before you suggest a business cause. Analysts who check the data first earn trust.
Many data interviews end in a take-home task: a dataset, a question, two to five days. Treat the hand-in as a small portfolio piece.
Employers and their needs differ. Where data jobs are posted shows who hires, so you can aim your practice at their data. If you want a cohort to practise with, the Data Science to AI Engineering programme starts on 11 January 2027, and no school can promise a job. See Data Science to AI Engineering.
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