| day_id | day_type | hour | orders | revenue |
|---|---|---|---|---|
| D1 | Weekday | 10 | 20 | 100 |
| D1 | Weekday | 14 | 30 | 150 |
| D2 | Weekday | 10 | 25 | 125 |
| D2 | Weekday | 14 | 35 | 175 |
AI and Data Analytics
November 16, 2026

What was your first “wait, it can do that?” moment with AI?
1. Learning from data
How machines find patterns
2. Inside generative AI
How an LLM produces text
3. Working with AI, responsibly
Rules, risks, and your role
4. Agents and jobs
What is changing right now




Vote on each one. What would you need to know?


geom_smooth(method = "lm")Constructed observations, for explanation only.

Constructed observations and illustrative groups.
| The question | The ML task |
|---|---|
| How many orders will we get tomorrow? | Regression |
| Will this customer cancel? | Classification |
| What kinds of customers do we have? | Clustering |
The question comes first, and you choose it.
Predict demand
How many orders will arrive tomorrow?
Organize feedback
Which comments mention waiting?
Explain findings
What does our sales chart show?
| day_id | day_type | hour | orders | revenue |
|---|---|---|---|---|
| D1 | Weekday | 10 | 20 | 100 |
| D1 | Weekday | 14 | 30 | 150 |
| D2 | Weekday | 10 | 25 | 125 |
| D2 | Weekday | 14 | 35 | 175 |
Training
Past inputs + known outcomes
The computer adjusts a model, a learned method for producing outputs.
Use
Inputs for a new case
The model produces an estimate before we know the answer.
A bakery predicts tomorrow’s muffin demand.
Predict too low
Sold out by noon, and lost sales
Predict too high
Unsold muffins, and wasted ingredients
The model
Predicts each hour from its inputs
A simple comparison
Always predict the earlier average
| Comment | Proposed topic |
|---|---|
| “The muffins sold out by noon.” | Menu/product |
| “Too expensive for a small latte.” | Price |
| “Great coffee, but a long line.” | Needs a rule |
🏨 Hotels
Forecast demand from weather, events, and rival prices
📦 Amazon
Forecast orders, arrange shelves, run warehouse robots
📺 Your feed
Guess what to show you next



Next time: how prediction learned to write.

Prepare
Draft a data dictionary. Organize text.
Analyze
Suggest R code. Explain an error.
Communicate
Propose chart titles. Critique a claim.
Predictive AI, 2010s
How many orders next week?
→ a number
Large language model (LLM)
What comes next in this text?
→ a token
cat playing extraordinary !

“The sea is ___”


Before our conversation
Training learns patterns from many examples.
During our conversation
Your prompt and files give context, which can change the response.
10th
GPT-3.5, percentile on the bar exam
90th
GPT-4, a successor model
👧 👽 👹 🏄 🏝️
🦸 🦸 👦 👧 👶
🤡 🎈
Lilo and Stitch, The Incredibles, It
Emergence
New abilities appear as models scale up.
A fixed bottleneck
One weak link gets fixed: say, knowing movie titles.
80% wrong
each individual expert, on facts
80%+ right
a model trained on 100 such experts
Surprisingly strong
Olympiad math
Poetry that passes as human
Tailored persuasive arguments
Surprisingly weak
Reliably counting objects in a picture
Staying consistent in a long chat
Saying “I don’t know”
Can be useful
Explain an R error
Draft a chart caption
Suggest a different comparison
Still needs checking
Did the code use the right rows?
Does the caption match the chart?
Is the comparison fair?

Data through July 2025. Source: Chatterji et al. (2025), NBER WP 34255.
Next time: how to work with something this uneven.
A narrow target
“Make the average recorded wait as low as possible.”
What if difficult orders are turned away?
The real goal
Serve customers well with reasonable waits.
Track service quality, and who is left out.
Whose data?
Whose biases?
Who does the hidden labor?
Who misuses it?
$1.5 billion
Bartz v. Anthropic settlement, final approval July 2026
Judge’s line
Training on lawfully bought books: fair use
Keeping pirated copies in a library: not
Source: Authors Guild (2026); JURIST (2026).

Data collected
Comment cards from weekend mornings, in English only
Proposed conclusion
“Customers want longer weekend hours.”
Jailbreaks
Role-play framing talks a model past its guardrails.
Prompt injection
Hidden text feeds AI instructions.
Cheap deception
Tailored phishing and deepfakes for pennies.
Companies
Transparency and human oversight
Governments
Sensible rules, though they lag
Researchers
Beneficial uses, not only capability
You
AI literacy and informed pressure
1. Always invite AI to the table
2. Be the human in the loop
3. Treat AI like a person (but tell it what kind of person it is)
4. Assume this is the worst AI you will ever use


Vague
Explain this error.
Specific
You are a TA for intro R students. Explain this dplyr error in under 100 words, then show the fix. Here are my code and the error.
Goal: Compare orders in the observed 10:00 and 14:00 hours.
Data: cafe_sales has one row per observed hour, with hour and orders.
Scope: Use familiar R functions. Don’t invent columns or assume complete days.
Output: Short R code, with each line explained.
Checks: Report how many rows enter the calculation.
| Rule, in brief | Our analytic habit |
|---|---|
| Invite AI to the table | Start with a small task you can check |
| Be the human in the loop | Verify the evidence and own the conclusion |
| Tell it what kind of person it is | State the audience, task, and limits |
| Assume this is the worst AI you’ll use | Re-test, and record the tool and date |
Overconfidence
“It did something amazing, so it can do anything.”
Algorithm aversion
“It failed once, so it’s all hype.”
Hold both ideas: AI is powerful and unreliable.
The default
Unless AI is explicitly permitted, work independently.
If permitted and you use it
Name the tools.
Submit your prompts and outputs.
Reflect on your use and learning.
Not sure? Ask first.
Generally fine
Public data
Made-up sample data
Your own code, with secrets removed
Keep out
Other people’s personal data
Passwords and API keys
Confidential work data
“What share of JFK flights left late?”
Both run, and both look fine. Which one answers the question?
2,266
court cases with hallucinated AI content, logged worldwide
3–13%
of URLs cited by AI were made up, even with web search
Source: Charlotin database, updated Nov 5, 2026; Rao, Wong, and Callison-Burch (2026), 2025-era models.
49%
more often than people, 11 leading models affirmed users’ actions
A better prompt
“What is the strongest argument against my conclusion?”
Source: Cheng et al., Science 391 (2026), as reported by the Associated Press.
50%
quiz score, coders who had AI
67%
quiz score, coders without AI
Randomized trial, 52 mostly junior engineers. Source: Anthropic (Jan 2026).
Tool: which AI, which version
Prompts and outputs: attached
What I checked: ran the code, confirmed counts in summarize()
What I changed: fixed the denominator; rewrote the claim
What I learned: why the first version answered a different question
An AI draft
“Customers are happier this month.”
Evidence needed
Comparable feedback records from both months
Rows
Which rows went in? Did a filter drop any?
Math
What is the denominator? Any missing values?
Code
Did I run it? Can I explain each line?
Claim
Does the evidence support it? Cause, or correlation?
“How many orders came in the 10:00 hours?”
morning yourself.| Hour | Observed hours | Orders | Revenue ($) |
|---|---|---|---|
| 10 | 4 | 115 | 575 |
| 14 | 4 | 125 | 625 |
sum(cafe_sales$orders).| Percentage claim | The denominator must match |
|---|---|
| Share of observed hours with long waits | Observed hours with a recorded wait |
| Share of comments about service | Comments under the stated labeling rules |
| Share of customers dissatisfied | Customers in a suitable survey |
na.rm = TRUE skips the missing value. It doesn’t recover it.I expected total revenue. Here are my code, the error, and the column names. Explain the problem and suggest the smallest fix.
"revenue" is text. $revenue selects the column.In these eight observed hours, the 14:00 hours had 125 orders, compared with 115 in the 10:00 hours. Each group covers four observed hours.
A comparison
Describes a pattern in the observed records
A causal claim
Says changing one thing would change the outcome
| Draft claim | What to check |
|---|---|
| “Sales doubled” | Original totals and the comparison period |
| “Customers want more staff” | The comments, who wrote them, and other explanations |
| “Weekends cause higher sales” | Whether the design can support a cause |
flights code.Next time: AI that acts, and what it means for your job.
88%
of organizations reported using AI in 2025
Single digits
agent deployment, in nearly every business function
Source: Stanford HAI, 2026 AI Index, Economy chapter; term from Mollick (2026).
Automation
Code repeats a routine task, such as the same weekly report from new data.
AI agent
Pursues a goal over several steps, and uses results to decide what to do next.
| The agent… | You check… |
|---|---|
reads sales.csv |
Right file? All the rows? |
writes and runs dplyr code |
Does it answer the question? |
| fixes its own errors | What did it drop or change? |
| makes a chart | Are the axes and labels honest? |
| writes a summary | Can you trace every number? |

1 in 3
agents fail this often on structured benchmarks
38%
best agent, right first try on real data questions
85%
of wrong answers: bad plan or faulty code
| Proposed action | What it needs |
|---|---|
| Draft a recommendation | The analyst checks the evidence |
| Save changes to original data | Approval, and an unchanged copy |
| Email staff or publish a report | Approval from an authorized person |
| Buy a service or change a schedule | Explicit authorization first |
Least access
Only the files and tools it needs
Approve before acting
Sending, deleting, or paying needs a person
Keep a log
See what it read, ran, and changed
Review the result
Your name goes on it, so you check it
Earlier examples
Steam power and the internet touched every industry, and they spread slowly.
Generative AI
ChatGPT reached 100 million users faster than any earlier product.
Which sort would you defend even if AI got much better?
Automate
Produce a routine sales report with less manual work.
Assist
Explore more questions and comparisons.
New responsibilities
Review AI outputs and manage the workflow.
Source: ILO (2025); Massenkoff and McCrory (2026).
Yale Budget Lab (Oct 2026)
No clear AI link to changes in occupational mix, employment, or unemployment
Anthropic (Mar 2026)
No systematic rise in unemployment for highly exposed workers
Source: Yale Budget Lab; Massenkoff and McCrory (2026).

Young-worker jobs falling
Where AI mainly automates tasks
Codified knowledge
Jobs flat or rising
Where AI mainly complements workers
Tacit, experience-based knowledge
How do you get experience if entry-level tasks shrink?
5.2%
recent-graduate unemployment, lowest in over a year
42.5%
recent graduates underemployed, ticking up
2026 Q3. Source: New York Fed, The Labor Market for Recent College Graduates.
Coding
Most daily analytics code was AI-assisted, with human review.
Rules
Policies differ. The New York Fed bars public tools and uses a secure in-house system.
Judgment
“You need to know what you’re asking it to do, and what the right answer looks like.”
Fall 2025 career sessions. Their own estimates and workplaces, as of fall 2025.
20–80%
gains in early studies of AI, on tasks from coding to marketing
18–22%
what steam power added in factories
Source: Mollick (2024), Introduction.
19% slower
measured time on real tasks, with AI
20% faster
what those same developers believed
Randomized trial, 16 experienced developers, 2025. Source: METR (2025); METR (2026) update.
2024 evidence
AI helps lower-skilled workers the most.
2026 evidence
Entry-level hiring is slipping in exposed jobs.
How can both be true? Talk with a neighbor.
Education
AI tutors, feedback, and new ways to assess
Media
Personalized content and disrupted industries
Information
Misinformation at scale, and hard to detect
Creativity
Who is the author, when the work is shared?
| Possible error | Possible consequence |
|---|---|
| Overstate how much staffing is needed | Unnecessary labor cost |
| Understate a real queue problem | Longer waits and lost business |
| Treat a few comments as everyone’s view | A poorly targeted response |
| Part | What the audience needs |
|---|---|
| Decision | The specific choice being considered |
| Evidence | A relevant comparison, with units and coverage |
| Limitation | What the data can’t establish |
| Next step | A proportionate action, or more evidence |
| Project element | What someone can inspect |
|---|---|
| Finding | The chart and its calculation |
| Calculation | The R script and relevant rows |
| Data | Source, variables, units, and dates |
| AI assistance | What it proposed, and what you verified |
Taste
Which chart tells the truth?
Deep expertise
Spotting the wrong denominator
Context
What these numbers mean here
Agency
Deciding on uncertain information
Name one task you’d delegate and one you’d keep. Why?
Reading and full source list: AI and Data Analytics reading. Questions: AI classwork.