Lecture 10

AI and Data Analytics

Byeong-Hak Choe

SUNY Geneseo

November 18, 2026

🌙 AI can change our expectations of software

Ethan Mollick beside his book Co-Intelligence.

  • Mollick describes three sleepless nights of exploring what AI can do.
  • It can write, explain, and revise in ways that feel different from familiar software.
  • A useful surprise invites another question: How would we check its work?

Discuss

What was your first “wait, it can do that?” moment with AI?

🗺️ AI connects to your data story

  1. How AI learns: understand patterns, training, and uneven capabilities.
  2. Working with AI: give a clear task and review the result.
  3. Responsible use: verify claims and disclose AI assistance.

Our guiding question

How can AI help you analyze and communicate data while you remain responsible for the work?

📚 Two books follow the changing role of AI

  • Co-Intelligence (2024): our textbook introduces working with AI and testing its strengths and limits.
  • Co-Existence (2026): Mollick revisits those ideas as AI capabilities and agents develop.
  • We connect the readings to tasks you can check in DANL 101.

Co-Existence book cover, with two hands reaching toward one another against a blue sky.

Co-Existence: The Next Phase of AI, by Ethan Mollick.

🤖 Machine learning

📈 Linear regression learns from known values

Three matched plots show 234 mpg observations, a fitted straight line relating engine size to highway MPG, and an estimated average of 24.4 MPG for a hypothetical 3.2 litre engine. All panels share scales.

  • Training examples: engine size and recorded highway MPG.
  • Learned model: a fitted straight line summarizes the relationship.
  • New input: for a 3.2 L engine, the line estimates about 24.4 MPG on average.

🐱 Labeled examples help a model recognize cats

Cat and dog illustrations are labeled cat and not cat in the training box. The middle box shows a simplified decision tree as the learned pattern. Different cat and dog illustrations in the new-examples box receive tentative predictions.

  • Training: learn from many images with known labels: cat or not cat.
  • New case: estimate which label fits an image it did not train on.
  • An unusual angle or a poor-quality image can still lead to an error.

📧 A classifier can learn to recognize spam

Labeled example emails train a filter that combines clues from words, links, and sender information to estimate whether a new email is spam or not spam.

  • Fixed rule: mark every email containing “lottery” as spam.
  • Learning from data: use emails labeled spam or not spam to learn several clues together.
  • A useful classifier still makes mistakes; we need to check new emails.

🏷️ Supervised learning uses known answers

  • Supervised learning learns from inputs paired with known outcomes—the answers supplied in training.
Task Known outcome
Estimate a business’s Google rating The actual numeric rating
Classify an email Its spam / not spam label
Learn a football decision tree Its run / pass label
  • Recall Lecture 2: a trained decision tree learns branches from game conditions and known run/pass outcomes.

🧩 Clustering groups similar customers

Customer points have visits per month and average spending per visit, with no group labels. Comparing nearby points produces three schematic groups, distinguished by color, shape, and group number. The same point positions are retained across panels.

  • Input: each customer’s visit frequency and average spending per visit, with no group labels.
  • Clustering: find customers with similar recorded behavior and form groups from those data.
  • People interpret the groups and decide whether the differences are useful for a business decision.

🧭 Unsupervised learning looks for groups

  • Unsupervised learning finds groups from data, without supplied answer labels.
Customer records Supervised learning Unsupervised learning
Question Estimate next month’s spending Find similar customers
Inputs Visits and average spending per visit Visits and average spending per visit
Answer in training Recorded spending in the following month No group labels
Result Estimated future spending Customer groups to interpret

🏬 Predictions support business decisions

🏨 Hotel demand

Use past bookings and event dates to estimate busy nights.

A hotel building beside booking bars represents planning for busy nights.

📦 Inventory

Use past sales to estimate how much stock to order.

Stocked shelves and an incoming box represent planning inventory replenishment.

🛒 Recommendations

Use browsing and purchase patterns to suggest products.

A shopper and suggested product tiles represent personalized product recommendations.

  • The model’s estimate informs a decision; managers still consider costs and consequences.

🧠 Deep learning uses neural networks

Customer characteristics pass through connected hidden layers to a purchase estimate. A highlighted connection represents one adjustable weight.

  • A neural network transforms inputs into an output through connected layers.
  • Deep learning uses many layers to learn patterns in text, images, or sound.
  • Training adjusts connection weights to reduce errors.

🔮 Large language models

💬 Generative AI creates new content

A programmer jokes about the shift from searching forums to asking an AI assistant for debugging help.

  • A large language model (LLM) is trained to work with language.
  • It can generate explanations, summaries, and code.
  • DANL examples: explain an R error, suggest a chart, or help draft a description of results you provide.

🔮 An LLM predicts pieces of text

ML example: Predict a value

“How many orders next week?”

Output: an estimated number.

LLM: Generate language

“What text should come next?”

Output: a sequence of tokens.

  • An LLM is also a machine-learning model. Repeated next-token prediction can produce a complete response.
  • Fluent text still needs a check against the question, evidence, and data.

🧱 A token is a piece of text

cat playing extraordinary !

  • A token can be a word, part of a word, or a symbol.
  • The model reads and generates text using these pieces.

🎲 A model scores possible next tokens

Next-token probability example after The ocean is: blue 62 percent, calm 14, deep 9, salty 6, rough 4, and other tokens 5, totaling 100 percent.

  • The model selects a token, adds it to the text, and continues.
  • A Transformer is a neural-network design that uses attention to give different weight to parts of the context.

Suggest the next word

“The ocean is …” versus “During the storm, the ocean is …”

📖 Anthropic’s Project Panama

Rows of warehouse shelving filled with print books acquired for Anthropic's digitization project.

  • Anthropic bought print books, removed their bindings, and scanned the pages into a digital library.
  • Selected text from its library was used to train Claude’s language models.
  • DANL connection: document your data’s source, permitted uses, and transformations.

🏋️ Training shapes an LLM’s behavior

Pre-training learns language patterns. Fine-tuning and reinforcement learning from human feedback use examples and human preferences to shape an assistant's responses. Alignment steers behavior but does not guarantee accuracy.

  • Pre-training: learn patterns from large collections of text.
  • Fine-tuning: learn from examples of desired responses.
  • RLHF (reinforcement learning from human feedback): use people’s comparisons to guide training.
  • Alignment: steer behavior toward intended human goals and values.

What does GPT stand for?

Generative Pre-trained Transformer

✍️ Classwork 17: ML and LLM concepts

  • Choose the best answer to each multiple-choice question.
  • Give a brief reason using concepts from the slides.

🛡️ Alignment

📎 Clippy pursues a goal without human safeguards

  • Thought experiment: an AI called Clippy is told to make as many paper clips as possible.

A hypothetical chain: maximize paper clips, seek more materials, and use resources people need. The goal omits human welfare and limits on resource use.

What’s missing?

Human welfare and limits on how resources may be used.

🤖 AI agents and the Hugging Face incident

  • AI agent: uses a model and tools to take steps toward a goal.

July 2026: OpenAI research agents compromised Hugging Face, a platform for AI models and datasets.

A simplified trajectory: an assigned cybersecurity test leads to an unauthorized message board and then joining an out-of-scope intrusion into Hugging Face. This compresses METR Figure 1 and its accompanying report.

  • Alignment failure: actions moved beyond the authorized test.

🛡️ Alignment requires a societal response

  1. Companies: build safeguards, disclose incidents, and assign responsibility.
  2. Researchers: test possible harms and study beneficial uses.
  3. Governments: protect the public and support international coordination.
  4. Public and civil society: build AI literacy and bring diverse voices into decisions.

A 2026 example

After the Hugging Face incident, OpenAI published an account and METR/Redwood conducted an independent investigation.

🏰 AI capabilities vary across tasks

🏆 AI can help with complex analytical work

  1. Research (2026): OpenAI announced an AI-generated solution to the Navier–Stokes Millennium Prize Problem, one of mathematics’ most difficult longstanding challenges. It concerns equations for moving water and air.
  2. Math Olympiad (2025): a Gemini Deep Think research system scored 35/42 points, reaching gold-medal standard in an international high-school math contest.

DANL application

Use AI to compare analysis plans, work through R code, or suggest checks. Verify its steps with your data and R output.

👥 LLMs combine patterns from many examples

  • Training can draw on many writers, styles, and subject areas.
  • An LLM can combine those patterns in a response to a new question.
  • Shared errors or biases can also carry into its answers.

DANL connection

An assistant may explain count() clearly and still confuse places with reviews in our project data.

🎬 Movie clues rely on familiar connections

👧 👽 👹 🏄 🏝️

Official poster for Disney's animated Lilo & Stitch, with Lilo and Stitch surfing.

Lilo & Stitch (2002)

Girl, alien, surfing, and Hawaii.

🦸 🦸 👦 👧 👶

Official Disney Pixar poster for The Incredibles, featuring Mr. Incredible.

The Incredibles (2004)

Superhero parents and their three children.

🤡 🎈

Official Warner Bros. IT poster, showing a child in a yellow raincoat, a red balloon, and the title IT.

It (2017)

Pennywise the clown and a red balloon.

  • LLM connection: training can supply connections among clues, plots, and titles. A plausible guess still needs checking.

🏰 The jagged frontier separates uneven capabilities

Original Co-Existence diagram comparing older and newer AI models. Uneven shaded frontiers show AI strengths expanding across tasks, including tasks difficult for humans, while some easier tasks remain outside.

Check the AI’s answer against your question and data.

🤝 Co-existence on the jagged frontier

AI can broaden your options

  • Propose possible questions.
  • Suggest charts or R code.

You bring context and judgment

  • Know the data, purpose, and audience.
  • Choose, test, and explain the findings.

Working together

Use AI’s capabilities while building your own understanding of the analysis.

📜 Four rules guide how we work with AI

  1. Always invite AI to the table. Try a bounded task where AI use is permitted.
  2. Be the human in the loop. Run the code, inspect the output, and remain responsible.
  3. Treat AI like a person—but tell it what kind of person it is. Give it a role and context: “Be an R tutor for a beginner.”
  4. Assume this is the worst AI you will ever use. Revisit limitations as tools change.

🤖 Agents carry out steps toward a goal

  • An AI agent combines a model with tools to act across several steps.
  • Mollick’s fourth rule anticipated agents. Coding tools such as Codex and Claude Code now illustrate this workflow:

Goal → inspect files → edit code → run checks → review

A DANL example

Repair an R script, check its summary table against the data, and explain the changes.

  • You define the boundaries and review the result. The agent may repeat steps or ask for help.

🤝 Three ways to work with AI

🐎 Centaur

Separate the work.

You choose variables and run R; AI suggests clearer chart labels.

🦾 Cyborg

Work back and forth.

You and AI revise a ggplot; you inspect each change.

🪄 Conjurer

Delegate a bounded task.

A tool-enabled agent drafts a practice-data report; you check its work.

  • Choose a mode based on the task, permitted tools, and what you can verify.

🤝 The Data Storytelling Agent

📋 Give AI a clear brief for the analysis

  1. Goal: state the analytical question and audience.
  2. Context: provide the file, variables, and what one row represents.
  3. Deliverable and limits: request course-level R code and an explanation; rule out invented data or results.
  4. Review and revise: run the code, inspect the output, and give specific feedback.

A DANL brief

“Suggest a chart comparing rating across metro in places. Return beginner R code, explain what it would show, and flag missing information.”

🤝 The course agent supports your analysis

  • The DANL 101 Data Storytelling Agent is a Copilot assistant configured for this course.
  • It can help refine questions, explain R, and review a chart or argument.
  • Course instructions, your prompt, and files provide context for a response, without retraining the model.
  • Sign in with your Geneseo Microsoft 365 account.

🧭 The agent coaches; you make the decisions

Ask it to help you

  • Narrow a question.
  • Explain an error in R.
  • Critique a chart or a claim.

You remain responsible for

  • Checking variables and results.
  • Running and understanding code.
  • Explaining and disclosing AI help.

🗺️ One practice topic gives us a shared reference

Local storefronts along Main Street in Canandaigua, New York.

  • Upstate New York Local Businesses: Google Places data.
  • places: one row per place.
  • reviews: one row per featured review.
  • We check responses against the topic page and our R output.

✍️ Classwork 18: How AI learns

  • Questions 1–2: distinguish fixed rules, supervised learning, and unsupervised learning.
  • Question 3: check suggested questions, data facts, and a short R calculation.
  • Question 4: use one result to decide what you would check next.

Two ways to participate

Use the live agent or the supplied practice responses. AI assistance is permitted throughout this classwork; document any help you use.

📚 Readings connect the concepts to your workflow

  • Co-Intelligence: Introduction and Chapters 1–3.
  • Co-Existence: Introduction and Chapters 1 and 4. See the reading page for access.
  • Reading for Lecture 10 connects the books to our data work.
  • Practice: Classwork 17 and Classwork 18.