In a diabetes clinic in Madurai, a technician holds a small camera up to a patient's eye and takes a photograph of the retina. Thirty years ago, that photograph would sit in a queue until an ophthalmologist had time to read it — and in a country with roughly one ophthalmologist for every 100,000-odd people in many districts, that queue could mean months. Today, in clinics working with Aravind Eye Hospital and Sankara Nethralaya, software trained by Google researchers reads the image in seconds and flags which patients need to see a specialist urgently. Four hundred kilometres north, an ISRO satellite passing over a wheat field in Punjab measures how much infrared light bounces off the crop canopy and feeds that number into a model that helps the Ministry of Agriculture estimate the season's harvest before a single stalk is cut. And in Bengaluru, a camera at a traffic junction counts vehicles lane by lane and decides, second by second, how long each signal should stay green.
These look like three unrelated stories — medicine, farming, traffic. They are not. Underneath, each system is solving the same kind of problem: take a noisy signal (a retinal image, a satellite reflectance value, a vehicle count), turn it into a number or a decision, and get that decision right often enough — and in a way you can actually measure — to be trustworthy. This chapter teaches you the real mathematics behind all three: how to evaluate a diagnostic AI properly, how a satellite "sees" a stressed crop, and how a traffic signal decides who gets to move. By the end, you will be able to compute these things yourself, not just describe them.
Healthcare: Reading Retinas, and Why "Accurate" Can Still Be Useless
The retinal-screening system used at Aravind Eye Hospital is built to detect diabetic retinopathy (DR) — damage to the retina's blood vessels caused by long-term high blood sugar, and one of the leading preventable causes of blindness in India. The AI (originally described by Google researchers in 2016 and later deployed in Indian eye hospitals as part of what Google called the Automated Retinal Disease Assessment tool) looks at a fundus photograph and outputs a probability that the image shows "referable" DR — disease serious enough to need a specialist.
Here is the question every diagnostic AI must answer before anyone trusts it: how do you know it's actually good? "It's 94% accurate" sounds impressive, but accuracy alone is one of the most misleading numbers in medical AI, and understanding why is the whole point of this section.
Suppose a diabetes clinic screens 1,000 diabetic patients. Based on prevalence studies in Indian diabetic populations, assume roughly 20% of them — 200 patients — actually have referable DR, and 800 do not. Suppose the AI has a sensitivity of 92% (it correctly catches 92% of true DR cases) and a specificity of 95% (it correctly clears 95% of healthy patients). Working out the actual counts:
- Of the 200 patients who truly have DR: 0.92 × 200 = 184 True Positives (TP), and the AI misses 200 − 184 = 16 False Negatives (FN).
- Of the 800 patients who are truly healthy: 0.95 × 800 = 760 True Negatives (TN), and the AI wrongly flags 800 − 760 = 40 False Positives (FP).
Now look at that last line in the diagram. If the AI simply predicted "no DR" for every single patient, it would still be right for all 800 truly healthy patients — an accuracy of 800/1000 = 80%. That sounds like a "good" AI by the accuracy number alone, yet it would be medically worthless: it would miss all 200 real cases of disease. This is the trap of class imbalance — when one outcome (healthy) is far more common than the other (diseased), a model can look accurate while being clinically useless. This is exactly why doctors and AI engineers report sensitivity (recall) and specificity separately, and why the precision — of every patient flagged positive, what fraction truly has the disease — matters just as much: here it is 184/224 ≈ 82%, meaning about 1 in 5 people sent for further specialist review will turn out not to have referable DR. A single combined score, the F1-score, balances precision and sensitivity:
F1 = 2 × (Precision × Sensitivity) / (Precision + Sensitivity)
def evaluate(tp, fp, fn, tn):
sensitivity = tp / (tp + fn) # recall
specificity = tn / (tn + fp)
precision = tp / (tp + fp)
f1 = 2 * precision * sensitivity / (precision + sensitivity)
return sensitivity, specificity, precision, f1
sens, spec, prec, f1 = evaluate(tp=184, fp=40, fn=16, tn=760)
print(f"Sensitivity: {sens:.3f}, Specificity: {spec:.3f}")
print(f"Precision: {prec:.3f}, F1-score: {f1:.3f}")
# Output:
# Sensitivity: 0.920, Specificity: 0.950
# Precision: 0.821, F1-score: 0.868
Common misconception, corrected: "A medical AI with high accuracy is a good AI." As you just proved with actual numbers, accuracy is only meaningful when you also know the class balance and look at sensitivity, specificity, and precision separately. This is exactly what CBSE's AI curriculum tests under "Model Evaluation" in the AI Project Cycle — confusion matrix, accuracy, precision, recall, and F1-score are not four unrelated formulas to memorise; they are four different questions you can ask about the same 2×2 table, and each answers something the others hide.
Why the Same Test Behaves Differently in Different Clinics
There's a subtler and more powerful idea hiding in that 82% precision figure, and it explains a real design decision Aravind Eye Hospital and similar programmes make: why screen diabetic patients specifically, instead of testing the general public?
The precision we calculated (82%) is really asking: "given that the test came back positive, what is the probability the patient truly has DR?" In probability language this is P(Disease | Positive test), and it is computed using Bayes' theorem — a formal tool you will study fully in Class 12 probability, and a favourite topic in JEE and BITSAT probability questions, but one whose logic you already used above without the formula:
P(D | +) = [ P(+ | D) · P(D) ] / [ P(+ | D) · P(D) + P(+ | ¬D) · P(¬D) ]
Plugging in sensitivity P(+|D) = 0.92, specificity-derived P(+|¬D) = 1 − 0.95 = 0.05, and prevalence P(D) = 0.20 in this diabetic clinic:
P(D|+) = (0.92 × 0.20) / (0.92 × 0.20 + 0.05 × 0.80) = 0.184 / (0.184 + 0.040) = 0.184/0.224 ≈ 0.821 — exactly the 82% precision you got by counting patients. The formula and the counting table always agree; Bayes' theorem is just the counting table written algebraically.
Now watch what happens if the same AI, with the same sensitivity and specificity, is instead used to screen the general public at a health mela, where the prevalence of referable DR might be closer to 2% rather than 20%:
P(D|+) = (0.92 × 0.02) / (0.92 × 0.02 + 0.05 × 0.98) = 0.0184 / (0.0184 + 0.049) = 0.0184/0.0674 ≈ 0.273.
The sensitivity and specificity of the AI have not changed at all — but the precision has collapsed from 82% to just 27%. In a low-prevalence population, nearly three-quarters of "positive" results would be false alarms. This is why real deployments target a pre-selected high-risk population (diabetic patients at a diabetes clinic) rather than screening everyone at random — the base rate of disease in the tested population changes what a positive result actually means, even though it says nothing about how good the AI itself is. Two other genuinely Indian-built systems apply this same evaluation discipline: Qure.ai (founded in Mumbai in 2016), whose chest X-ray AI qXR is used for tuberculosis triage within India's National TB Elimination Programme, and Niramai (Bengaluru), whose Thermalytix system screens for breast cancer using AI on thermal images rather than radiation — useful precisely because it needs no mammography machine or on-site radiologist, which matters in smaller Indian towns.
Agriculture: Teaching a Satellite to "See" a Stressed Crop
A satellite cannot ask a wheat field "how are you feeling?" But it can measure something almost as useful: how much light of different wavelengths the field reflects back into space. This is the basis of one of the most important tools in agricultural AI — the Normalized Difference Vegetation Index (NDVI), used by ISRO's FASAL programme (Forecasting Agricultural output using Space, Agrometeorology and Land-based observations, run by the Ministry of Agriculture & Farmers Welfare's Mahalanobis National Crop Forecast Centre) to estimate crop production across India each season.
The physics behind it is simple enough to derive completely. Healthy plant leaves are packed with chlorophyll, which strongly absorbs red visible light (that's why leaves look green — green is what's left over) but strongly reflects near-infrared (NIR) light, which is invisible to our eyes but easily measured by satellite sensors. A stressed, sparse, or dying crop has less chlorophyll and a less developed leaf structure, so it absorbs less red light and reflects less NIR. NDVI turns this difference into a single number between −1 and +1:
NDVI = (NIR − Red) / (NIR + Red)
where NIR and Red are the fractions of near-infrared and red light reflected back to the satellite (values between 0 and 1). Notice why it's a ratio of a difference to a sum, not just the difference alone: this cancels out variation in overall brightness (a cloudy day versus a bright one, or morning versus noon sun angle) that would otherwise throw off the comparison — only the shape of the reflectance, red versus infrared, survives.
Worked example. A Resourcesat pixel over a healthy, densely-grown wheat field mid-season reflects Red = 0.10 and NIR = 0.50: NDVI = (0.50 − 0.10)/(0.50 + 0.10) = 0.40/0.60 ≈ 0.67, in the typical 0.6–0.9 range FASAL analysts associate with vigorous, dense vegetation. A neighbouring patch hit by water stress or pest damage reflects Red = 0.20 and NIR = 0.25: NDVI = 0.05/0.45 ≈ 0.11 — close to bare soil, which typically sits around 0.1–0.2, while open water gives NDVI near zero or negative (water absorbs NIR almost completely). FASAL combines these satellite-derived vegetation trends over the growing season with rainfall and soil data to forecast state- and district-level production of crops like rice and wheat before harvest.
A separate but related effort, the AI Sowing App built by Microsoft in partnership with ICRISAT (the International Crops Research Institute for the Semi-Arid Tropics, headquartered in Hyderabad), used machine learning on roughly three decades of historical weather data to text farmers in Devanakonda village, Andhra Pradesh, the optimal sowing date for the 2016 kharif groundnut season. Microsoft's own case study reported yield gains of up to 30% for participating farmers in that pilot — a reminder that in agriculture, unlike a lab benchmark, "did the model work" is ultimately measured in kilograms per hectare, months after the prediction was made. For pest and disease identification directly from a phone photo, many Indian farmers use Plantix, an image-classification app built by the German company PEAT GmbH — a useful example that not every AI tool reaching Indian farms is Indian-built, even when its impact is concentrated here.
Common misconception, corrected: "A high NDVI always means a healthy, high-yielding crop." NDVI actually measures greenness and canopy density, not health directly — a field thick with weeds can show just as high an NDVI as a thriving crop, and factors like soil brightness underneath a sparse canopy, mixed pixels (a satellite pixel covering part-field, part-road), and atmospheric haze can all shift the number. Agencies like FASAL treat NDVI as one strong, physically-grounded input into a larger yield model, not a standalone verdict — the same "don't trust one number in isolation" lesson from the DR screening confusion matrix, showing up again in a completely different domain.
Smart Cities: Squeezing More Capacity Out of the Same Road
A traditional traffic signal runs on a fixed timer: North-South gets 30 seconds of green, East-West gets 30 seconds, regardless of whether one direction has 50 waiting cars and the other has none. An Adaptive Traffic Control System (ATCS) — deployed at junctions in Bengaluru (whose traffic police adopted the Sydney Coordinated Adaptive Traffic System, SCATS, over a decade ago) and, under the Smart Cities Mission launched in 2015, in Pune and Hyderabad — uses cameras and sensors to count vehicles approach by approach and reallocates green time to match real demand.
The vehicle counts themselves come from real-time object detection — the same family of convolutional neural network techniques used for image classification, applied frame by frame to a camera feed to count and classify vehicles by lane. Once you have those counts, the allocation logic, a simplified version of the classical Webster method from traffic engineering, is straightforward algebra:
gi = (di / ΣD) × G
where di is the measured vehicle demand on approach i, ΣD is the total demand summed across all approaches, and G is the total effective green time available in one signal cycle (the cycle length minus fixed "lost time" for amber and all-red clearance intervals, which no reallocation can recover).
Worked example. A four-way junction runs a 120-second cycle with 16 seconds lost per cycle to amber and all-red intervals, leaving an effective green budget G = 104 seconds. Cameras report vehicle counts over a rolling 5-minute window: North 48, South 44, East 20, West 12, so ΣD = 124.
| Approach | Vehicles (di) | Proportional green time gi = (di/124) × 104s |
|---|---|---|
| North | 48 | 40.3 s |
| South | 44 | 36.9 s |
| East | 20 | 16.8 s |
| West | 12 | 10.1 s |
Check: 40.3 + 36.9 + 16.8 + 10.1 = 104.1 s ≈ G (rounding). Compare this to a fixed-timer signal that simply splits 104 seconds evenly, 26 seconds per approach: North and South, the heavier directions, would be under-served and queues would spill back through the previous junction, while East and West would sit on green with few or no cars using it. The AI hasn't invented new road capacity — a common overclaim — it has simply stopped wasting the capacity that already exists. This is also why India's Air Quality Index forecasting system, SAFAR (System of Air Quality and Weather Forecasting And Research, run by the Indian Institute of Tropical Meteorology in Pune under the Ministry of Earth Sciences, and operating in Delhi, Mumbai, Pune, and Ahmedabad), blends statistical and machine-learning models with physical chemical-transport models rather than relying on either alone — traffic and pollution are two faces of the same congestion problem, one measured in vehicles, the other in micrograms per cubic metre.
Common misconception, corrected: "Smart-city AI eliminates traffic jams." It does not — it reallocates a fixed resource (green time, road width) more efficiently under real-time demand, and once total demand exceeds what the junction can physically clear in a cycle, no reallocation formula prevents queuing; the underlying road capacity is still the hard limit set by geometry, not software.
These camera networks also raise a real, non-generic concern: continuous vehicle and pedestrian tracking is personal data. India's Digital Personal Data Protection Act, 2023 (DPDP Act) now governs how such data — along with health records digitised under the Ayushman Bharat Digital Mission's health ID system — must be collected, stored, and consented to. An AI system that is statistically excellent but legally or ethically careless with the data it depends on is not actually a deployable system; this is now a standard part of how these three fields are taught and built in India, not an afterthought.
Careers Built on These Three Pillars
Each domain in this chapter maps to a real, distinct career track. Clinical AI validation — running exactly the confusion-matrix and Bayes-theorem analysis you just did, but on new models before hospitals trust them — is a growing role at companies like Qure.ai and Niramai and inside hospital systems like Aravind. Remote sensing and agronomy — turning satellite reflectance into yield forecasts — is core work at ISRO's applications centres and at agri-tech firms that license government satellite data. Urban informatics and traffic data science — the discipline behind ATCS deployments — increasingly sits inside city Smart City Special Purpose Vehicles and transport engineering consultancies. All three need the same foundation you built today: comfort with ratios, conditional probability, and the discipline to ask "accurate compared to what baseline?" before believing any performance claim.
Check Your Understanding
- A TB-screening chest X-ray AI is tested on 500 patients from a high-risk population where 15% truly have active TB. The AI has sensitivity 90% and specificity 88%. Compute TP, FN, TN, and FP, then find the precision. (Start by finding how many of the 500 truly have TB.)
- Using the same sensitivity and specificity as above, recompute precision using Bayes' theorem if the AI were instead used on a general population screening with only 1% true TB prevalence. What does the comparison tell you about deploying diagnostic AI in targeted versus general populations?
- A satellite pixel over a rice field reports Red reflectance = 0.08 and NIR reflectance = 0.45. Compute the NDVI. Is this closer to the "healthy" or "stressed" example in this chapter?
- Explain, using the physics of chlorophyll absorption, why NDVI is defined as (NIR − Red)/(NIR + Red) rather than simply NIR − Red.
- A three-way junction has a 90-second cycle with 12 seconds of lost time per cycle. Camera counts show approach A: 30 vehicles, approach B: 45 vehicles, approach C: 15 vehicles. Compute the proportional green time for each approach and verify your three answers sum to the effective green budget.
- A classmate says, "Since our smart traffic signal uses AI, our junction will never have a traffic jam again." Using an idea from this chapter, explain precisely why this claim is false.
Summary
- Accuracy alone can hide a useless model when classes are imbalanced (rare disease, mostly-healthy population); sensitivity, specificity, precision, and F1-score together give the full picture, and this is exactly what CBSE's AI "Model Evaluation" unit tests.
- Precision is not a fixed property of an AI model — it depends on the prevalence of the condition in the population being tested, a consequence of Bayes' theorem that explains why real screening programmes (Aravind Eye Hospital, Qure.ai's TB triage) target high-risk populations rather than the general public.
- NDVI = (NIR − Red)/(NIR + Red) converts a satellite's raw reflectance measurements into a physically grounded vegetation signal, used by ISRO's FASAL programme for national crop forecasting, but it measures greenness/biomass, not health or yield directly, and can be confounded by weeds, bare soil, and mixed pixels.
- Adaptive traffic signals reallocate a fixed green-time budget proportionally to real-time measured demand, gi = (di/ΣD) × G; this improves on fixed timers but cannot exceed the physical capacity of the road, and does not eliminate congestion once demand outgrows that capacity.
- All three domains — healthcare, agriculture, and smart cities — reduce to the same underlying pipeline: sensor data, a model that turns it into a number or decision, and a human decision-maker who understands the model's real, measured limits, including the legal and ethical frame the DPDP Act and ABDM now put around the data these systems run on.
Think About It
Think about this: How would you explain ai in healthcare, agriculture, and smart cities: india's ai future to a friend who has never seen a computer? What real-world analogy would you use? Imagine you had to build a system using these concepts — what would be your first step? Try this: before moving on, write down three things you learned and one question you still have.
Practice Exercises
Now it is time to practice! Complete these challenges to solidify your understanding:
- Exercise 1: Write a short program that demonstrates the core concept from this chapter. Test it with at least 3 different inputs.
- Exercise 2: Find a real-world example where ai in healthcare, agriculture, and smart cities: india's ai future is used in an Indian company (like TCS, Infosys, Flipkart, or ISRO). Write a paragraph explaining the connection.
- Exercise 3: Create a mind-map connecting ai in healthcare, agriculture, and smart cities: india's ai future to at least 3 other topics you have studied.