Home Module 1 - Introduction to AI Module 2 - Problem-Solving & Search Module 3 - Uncertainty in AI Module 4 - Games & CSP Module 5 - AI in Practice & Ethics Important Questions
Module 5 of 5

AI in Practice and Ethics in AI

The final module shifts from algorithms to applications and consequences: how the search, uncertainty-handling, and decision-making techniques of Modules 1–4 are deployed in finance, marketing, healthcare, and law enforcement - and the ethical responsibilities that come with deploying AI systems that affect real people's lives, livelihoods, and liberty.

13 Hours
4 Core Topics
CO5 - Apply AI to real-time problems (L3)
5.1

AI in Finance and Marketing

Finance and marketing were among the earliest large-scale commercial adopters of AI, since both domains have abundant historical data, clear quantifiable objectives (profit, risk, conversion), and high tolerance for statistical (not perfectly explainable) decision-making.

Applications of AI in Financial Modeling

ApplicationAI Technique Typically UsedPurpose
Algorithmic TradingReinforcement learning, time-series ML modelsExecute trades automatically based on market signals, faster than human reaction time
Credit ScoringDecision trees, logistic regression, gradient boostingPredict the likelihood a borrower will repay a loan
Fraud DetectionAnomaly detection, Bayesian networks (Module 3)Flag transactions statistically inconsistent with a customer's normal behavior
Robo-AdvisorsPortfolio optimization algorithms, MDPs (Module 3)Automatically allocate and rebalance investment portfolios
Risk ManagementMonte Carlo simulation, decision theory (Module 3)Estimate Value-at-Risk and stress-test portfolios under uncertain market scenarios

AI-Driven Marketing Strategies

ApplicationHow AI Helps
Customer SegmentationClustering algorithms group customers by behavior, enabling targeted campaigns
Recommendation SystemsCollaborative filtering / content-based filtering suggest products based on past behavior and similar users
Sentiment AnalysisNLP models gauge public/customer sentiment from reviews and social media
Dynamic PricingDemand-prediction models adjust prices in real time based on demand, competition, inventory
Churn PredictionClassification models flag customers likely to cancel/leave, enabling proactive retention

Worked Example - Credit Scoring as a Decision-Theoretic Problem

A bank deciding whether to approve a loan is a direct application of Module 3's Maximum Expected Utility framework: P(repay) is estimated from a probabilistic model (credit score), and the bank computes EU(approve) = P(repay)×Profit + P(default)×Loss, approving only if this exceeds EU(reject) = 0 (or some baseline alternative-use-of-capital return).

✓ Advantages
  • Processes vastly more data, faster, than human analysts
  • Reduces certain forms of human bias and emotional decision-making in trading
  • Enables hyper-personalization at a scale impossible manually
✗ Disadvantages
  • Algorithmic trading can amplify market volatility (e.g., "flash crashes")
  • Credit/risk models can encode and perpetuate historical biases present in training data
  • "Black box" models reduce explainability - a regulatory and trust concern in finance
⚠ Why This Connects to Ethics (Topic 5.4)

A credit-scoring model trained on historically biased lending data can learn to systematically disadvantage certain demographic groups, even without any explicit protected attribute in its inputs - a direct preview of the fairness concerns formalized in this module's final Ethics topic.

🔑 Key Points
  • Finance applications: algorithmic trading, credit scoring, fraud detection, robo-advisors, risk management.
  • Marketing applications: segmentation, recommendations, sentiment analysis, dynamic pricing, churn prediction.
  • Both domains directly apply Module 3's decision theory/utility/probability concepts to real money-on-the-line decisions.

Interview Questions

Q. How does Maximum Expected Utility apply to a bank's loan-approval decision?

The bank estimates P(repay) using a predictive credit model, then computes the expected utility of approving the loan (P(repay)×profit + P(default)×loss) versus rejecting it (typically a fixed, lower-risk baseline return). MEU dictates approving only when the expected value of lending exceeds the expected value of not lending - directly applying Module 3's decision theory framework to a concrete financial decision.

5.2

AI in Healthcare: Medical Diagnosis, Treatment Planning, and Data Analytics

Healthcare is one of AI's highest-stakes application domains - errors directly affect patient safety, and the field is heavily shaped by both technical and ethical/regulatory considerations.

Medical Diagnosis Using AI

ApplicationAI TechniqueExample
Diagnostic decision supportBayesian networks (Module 3)Estimate P(disease | symptoms, test results) - a direct application of BN inference
Medical imaging analysisDeep learning / convolutional networksDetecting tumors in radiology scans, diabetic retinopathy in eye images
Symptom checkersDecision trees / rule-based + ML hybrid systemsPatient-facing apps suggesting possible conditions and urgency level
GenomicsPattern recognition, classificationIdentifying disease-linked genetic markers

Treatment Planning Using AI

  • Personalized treatment plans - using patient-specific data to recommend tailored therapy (precision medicine).
  • Drug discovery & dosage optimization - search and optimization algorithms (Module 2's GA/PSO) explore vast chemical/dosage spaces.
  • Treatment sequencing as an MDP - choosing a sequence of treatments over time under uncertain patient response is naturally modeled as a Markov Decision Process (Module 3), where states = patient health status, actions = treatment options, rewards = health outcomes.
  • Surgical robotics - AI-assisted precision in robotic-assisted surgery.

Healthcare Data Analytics

ApplicationPurpose
Predictive analytics for patient deteriorationEarly-warning systems for ICU/ward patients, flagging risk of sudden decline
Hospital resource optimizationScheduling (CSP techniques, Module 4) for staff, beds, equipment
Epidemiological modelingPredicting disease spread patterns using probabilistic models
Electronic Health Record (EHR) miningNLP extraction of structured insights from unstructured clinical notes
💡 Worked example - Bayesian Network for Diagnosis

A diagnostic BN might have nodes Disease → {Symptom1, Symptom2, TestResult}. Given observed symptoms and test results as evidence, inference (as in Module 3.3) computes P(Disease | evidence) - exactly the diagnostic reasoning pattern studied earlier, now applied to a real clinical decision-support tool.

✓ Advantages
  • Can detect subtle patterns in medical images beyond human perceptual limits
  • Scales expert-level diagnostic support to underserved/remote areas
  • Reduces diagnostic delay and supports earlier intervention
✗ Disadvantages
  • Errors can have severe, irreversible consequences (misdiagnosis, wrong treatment)
  • Models trained on non-representative populations may perform poorly for underrepresented groups
  • "Black box" predictions are difficult for clinicians and patients to trust or audit
  • Strict regulatory approval processes (e.g., FDA) slow deployment, for good safety reasons
⚠ Why Human-in-the-Loop Matters

Virtually all deployed clinical AI systems are designed as decision support, not autonomous decision-makers - final diagnostic/treatment authority remains with a licensed clinician. This reflects both regulatory requirements and an ethical principle (discussed further in Topic 5.4): high-stakes, irreversible decisions should retain meaningful human oversight.

🔑 Key Points
  • Diagnosis applications directly reuse Module 3's Bayesian network inference.
  • Treatment planning over time can be modeled as an MDP.
  • Human-in-the-loop oversight remains standard practice for safety and accountability.

Interview Questions

Q. Why might an AI diagnostic model perform worse on certain patient subgroups despite high overall accuracy?

If the training data underrepresents a subgroup (e.g., a particular ethnicity, age range, or sex), the model has less signal to learn that group's patterns accurately, even if it performs well on average across the whole (imbalanced) dataset. Overall accuracy can mask substantially worse subgroup-specific performance - a key reason healthcare AI evaluation requires disaggregated, subgroup-level metrics, not just an aggregate accuracy number.

5.3

AI in Law Enforcement: Predictive Policing and Crime Analysis

AI in law enforcement is the most ethically contentious application area covered in this module - its use directly implicates civil liberties, due process, and the risk of automating and entrenching historical injustice. This topic and the next (Ethics) are closely linked.

Predictive Policing

📘 Definition

Predictive policing refers to the use of statistical/AI models to forecast where crimes are likely to occur (place-based predictive policing) or who is likely to be involved in future criminal activity (person-based predictive policing), in order to guide resource allocation and patrol decisions.

Common Techniques Used

TechniqueApplication
Hotspot mapping / spatial statisticsIdentifying geographic areas with elevated predicted crime risk
Time-series forecastingPredicting crime rate trends to plan patrol scheduling
Risk-assessment scoring toolsEstimating recidivism risk to inform bail, sentencing, or parole decisions
Facial recognitionIdentifying persons of interest from surveillance/camera footage
Network/link analysisMapping relationships between suspects in organized crime investigations

Crime Analysis

Beyond prediction, AI supports retrospective and investigative crime analysis: clustering similar crimes to detect patterns/serial offenses, anomaly detection in financial records for fraud investigation, and natural-language analysis of case reports to surface connections investigators might miss manually.

Ethical Considerations in AI-Based Law Enforcement

⚠ The Core Problem: Historical Bias Becomes Automated Bias

Predictive policing models are typically trained on historical arrest/crime data. If past policing was disproportionately concentrated in certain neighborhoods or demographic groups (whether due to genuine crime patterns or biased enforcement practices), the model learns and reinforces that same pattern - directing future patrols back to the same areas, generating more arrests there, and creating a feedback loop that entrenches rather than corrects historical bias.

ConcernDescription
Feedback loopsPredictions drive enforcement, which generates the data used to retrain future predictions - self-reinforcing bias
Disparate impactEven "race-blind" models can disproportionately affect certain groups via correlated proxy variables (e.g., zip code)
Due process & transparencyRisk-scoring tools used in bail/sentencing decisions are often proprietary "black boxes," limiting a defendant's ability to challenge the basis of a decision
Facial recognition accuracy disparitiesDocumented lower accuracy rates for some facial recognition systems on darker-skinned and female faces, risking misidentification
AccountabilityUnclear who bears responsibility when an algorithmic recommendation contributes to a wrongful arrest or unjust sentence
💡 Discussion example (descriptive, not an endorsement)

Several U.S. cities have discontinued specific predictive policing programs after independent audits found they disproportionately flagged historically over-policed neighborhoods, illustrating the feedback-loop concern in practice and motivating stronger auditing/oversight requirements before deployment.

Proposed Safeguards

  • Independent algorithmic audits and bias testing before deployment
  • Transparency requirements - disclosure of model logic/criteria, at least to oversight bodies
  • Human review as the final decision-maker, not the algorithm alone
  • Regular retraining/recalibration with bias-correction techniques
  • Community oversight and the ability for affected individuals to contest algorithmic decisions
🔑 Key Points
  • Predictive policing = place-based (hotspot) or person-based (risk scoring) crime forecasting.
  • Major risk: feedback loops that automate and entrench historical enforcement bias.
  • Key safeguards: audits, transparency, human review, contestability.

Interview Questions

Q. Explain the feedback-loop problem in predictive policing with a concrete example.

Suppose a neighborhood was historically over-patrolled, generating more recorded arrests there regardless of the true underlying crime rate. A predictive policing model trained on this arrest data learns that the neighborhood is "high risk" and recommends more patrols there. More patrols lead to more arrests (simply due to more police presence, not necessarily more crime), which is fed back into the training data - reinforcing the model's belief and creating a self-perpetuating cycle that's disconnected from the area's actual crime rate.

Q. Why can a "race-blind" predictive policing model still produce racially disparate outcomes?

Even without race as an explicit input feature, other variables (like zip code, prior arrest history, or socioeconomic indicators) can be strongly correlated with race due to historical and structural patterns, acting as proxy variables. The model can effectively reconstruct racial bias through these proxies even while never directly using race as a feature - this is a well-documented phenomenon in algorithmic fairness research.

5.4

Ethical Uses of AI: Case Studies and Ethical Decision-Making

This closing topic synthesizes the ethical threads running through Module 5's applications into a structured framework - the core principles, common failure modes, and decision-making practices for responsible AI development and deployment.

Core Pillars of AI Ethics

PrincipleMeaningExample concern
FairnessAI systems should not produce systematically discriminatory outcomes across protected groupsCredit scoring, hiring algorithms, predictive policing (Topic 5.3)
Transparency & ExplainabilityDecisions, especially high-stakes ones, should be understandable/auditable, not pure "black boxes"Loan denials, medical diagnoses, sentencing recommendations
AccountabilityClear responsibility must exist for an AI system's decisions and errorsWho is liable when a self-driving car causes an accident?
PrivacyAI systems should respect data ownership, consent, and minimize unnecessary surveillance/data collectionFacial recognition, health data, behavioral tracking
Safety & RobustnessSystems should behave reliably and fail safely, even on inputs outside their training distributionAutonomous vehicles, medical AI, industrial control systems
Human OversightMeaningful human control should remain over high-stakes, irreversible decisionsMedical treatment (Topic 5.2), criminal justice (Topic 5.3)

Sources of Bias in AI Systems

Bias TypeDescription
Historical biasTraining data reflects past societal/institutional discrimination, which the model then learns and perpetuates
Representation biasSome groups are underrepresented in the training data, leading to poorer model performance for them
Measurement biasThe features/labels used as proxies don't equally capture the true target across groups
Aggregation biasA single model applied uniformly fails to capture meaningful differences between subgroups
Evaluation biasBenchmark datasets used to test the model aren't representative of real-world deployment populations

Case Study Themes (descriptive, for ethical analysis - not specific named-product claims)

  • Hiring algorithms trained on historical resumes can learn to disadvantage candidates based on gender or other attributes correlated with past hiring patterns, even unintentionally.
  • Healthcare resource-allocation algorithms using "past healthcare spending" as a proxy for "healthcare need" can systematically underestimate need for groups that historically had less healthcare access (the proxy fails to measure the true target equally across groups).
  • Content recommendation systems optimized purely for engagement can inadvertently amplify misinformation or extreme content, since such content often drives higher engagement metrics.
  • Generative AI raises new concerns: misinformation/deepfakes, intellectual property questions, and the potential for automation to displace certain jobs faster than new roles can be created.

Frameworks for Ethical Decision-Making in AI Projects

  1. Identify stakeholders and potential harms - who could be affected, and how, including indirect/downstream effects.
  2. Audit training data and model outputs for bias - disaggregated performance metrics across relevant subgroups, not just aggregate accuracy.
  3. Assess explainability needs - does the deployment context (e.g., medical, legal) require interpretable models, or can a more accurate "black box" be acceptable with other safeguards?
  4. Build in human oversight appropriate to the stakes and reversibility of the decision.
  5. Establish accountability and recourse mechanisms - how can an affected person contest or appeal an AI-influenced decision?
  6. Monitor post-deployment - bias and performance can drift over time as the real-world data distribution changes ("model drift").
💡 Worked example - Fairness Metrics Tension

Two common fairness definitions - demographic parity (equal positive-prediction rates across groups) and equalized odds (equal true-positive and false-positive rates across groups) - can mathematically conflict when the base rates of the true outcome differ between groups. This proves there is no single universal definition of "fair," forcing explicit, context-dependent value judgments in any real deployment - a frequently tested conceptual point.

⚠ Key Exam Insight

AI ethics is not just about *avoiding bad outcomes* - it's about *designing accountable processes*, because perfect fairness across every metric simultaneously is mathematically impossible in many real settings (as the fairness-metrics-tension example shows). Good AI ethics practice is therefore about transparent trade-off decisions, not a single "fix."

Connecting Back: Why This Belongs in an AI Course

Every technique in Modules 1–4 is ethically neutral in isolation - search algorithms, Bayesian inference, and MDPs are mathematical tools. Module 5 makes explicit that the application context determines the ethical stakes: the same A* search algorithm routing a delivery truck (Module 2) raises no ethical concern, but a similar optimization technique allocating police patrols (Topic 5.3) raises serious ones - engineers must evaluate context, not just algorithmic correctness.

🔑 Key Points
  • Six core pillars: fairness, transparency, accountability, privacy, safety, human oversight.
  • Bias enters via historical, representation, measurement, aggregation, and evaluation pathways.
  • Fairness metrics can mathematically conflict - there is no single universal definition of "fair."
  • Ethical AI practice = transparent, accountable processes, not a one-time technical "fix."

Interview & Exam Questions

Q. Why can a healthcare algorithm using "past healthcare spending" as a proxy for "healthcare need" produce biased outcomes?

If a demographic group has historically had less access to healthcare (due to cost, location, or other systemic barriers), their past spending will be artificially lower than their true medical need would suggest. A model treating spending as a stand-in for need will then underestimate that group's actual need, allocating fewer resources to them - this is a textbook example of measurement bias, where the proxy variable doesn't equally represent the true target across groups.

Q. Explain why demographic parity and equalized odds can be mathematically incompatible fairness criteria.

Demographic parity requires equal positive-prediction rates across groups, while equalized odds requires equal true-positive and false-positive rates across groups. If the true base rate of the outcome being predicted genuinely differs between groups, it is mathematically impossible (except in special cases) to satisfy both criteria simultaneously with a non-trivial classifier - forcing a deliberate choice about which fairness definition matters most in a given context, rather than allowing a one-size-fits-all technical solution.

Q. Why is "human oversight" considered an ethical safeguard rather than just an engineering best practice?

Beyond catching technical errors, human oversight provides accountability - a person (or institution) who can be held responsible for a decision, and who can exercise judgment AI systems lack regarding context, exceptional circumstances, and value trade-offs. For high-stakes, irreversible decisions (e.g., denying medical treatment, sentencing), removing human oversight removes a key check against automated, unaccountable harm.

📋 Module 5 - Complete Summary

Module 5 closed the course by connecting Modules 1–4's algorithms to real deployment contexts. AI in Finance & Marketing applies decision theory and probabilistic models to trading, credit scoring, fraud detection, and personalized marketing. AI in Healthcare reuses Bayesian network inference for diagnosis and MDP framing for treatment sequencing, under strict human-oversight norms given the stakes involved. AI in Law Enforcement showed the highest-risk application - predictive policing's feedback-loop and proxy-bias problems illustrate how historically biased data can be automated and entrenched rather than corrected. The closing Ethics topic formalized this into six core pillars (fairness, transparency, accountability, privacy, safety, human oversight), catalogued the five major bias pathways, and demonstrated - via the demographic-parity/equalized-odds tension - that ethical AI deployment requires explicit, accountable trade-off decisions rather than a single universal technical fix.