Ch. 1
Ch. 2

# Lesson 14: Automating Data Decisions

## Overview

In this lesson students look at a simple example of how a computer could be used to complete the decision making step of the data problem solving process. Students are given the task of creating an algorithm that could suggest a vacation spot. Students then create rules, or an algorithm, that a computer could use to make this decision automatically. Students share their rules and what choices their rules would make with the class data. They then use their rules on data from their classmates to test whether their rules would make the same decision that a person would. The lesson concludes with a discussion about the benefits and drawbacks of using computers to automate the data problem solving process.

## Purpose

This lesson demonstrates to students that the last step in the data problem solving process, making a decision, is something that a computer can do automatically if it's given an algorithm. It builds off the previous lesson which demonstrates the importance of designing the way you collect data in order for it to be usable for interpretation. This is especially true for computers which are much better suited for the multiple choice style data they will see in this lesson.

## Assessment Opportunities

1. Design and implement an algorithm for making decisions using data as inputs

Activity Guide: The points assigned to each vacation spot on the first page are consistent with how the algorithm is implemented on the second page.

2. Explain the benefits and drawbacks of using computers for automated decision making

Wrap Up: Students should identify multiple advantages and disadvantages to automated decision making.

3. Interpret collected data to identify patterns

Activity Guide, page 1: The points assigned to each vacation spot should reasonably reflect the given data. (see exemplar)

## Objectives

### Students will be able to:

• Design and implement an algorithm for making decisions using data as inputs
• Explain the benefits and drawbacks of using computers for automated decision making
• Interpret collected data to identify patterns

Heads Up! Please make a copy of any documents you plan to share with students.

Forum

# Teaching Guide

## Lesson Modifications

Attention, teachers! If you are teaching virtually or in a socially-distanced classroom, please read the full lesson plan below, then click here to access the modifications.

## Warm Up (5 mins)

Discussion Goal

Goal: This discussion may be hard to keep small but the point is just to get students thinking about the fact that computers need data (inputs) and rules (i.e. an algorithm) for making a decision (output). So long as students have had a chance to see an example of those three components of the input-output-store-process model of the computer it's fine to move on. That said, here's some ideas students might mention

• Inputs: The temperature, the weather, what kinds of events you have today, etc.
• Rules: If temperature less than 60 bring a jacket, if fancy event put out fancy clothes, if sunny bring sunglasses, etc.

Prompt: Imagine you were going to program a computer to automatically select clothing from your closet for you in the morning. What kinds of data would this computer need? What kinds of rules would you want it to use?

Discuss: Students should silently develop responses, then share in small groups, then discuss with the whole class.

Remarks

For a computer to make a decision it needs data as input and an algorithm to process it. This is just the input-output-store-process model we learned about before. In the last class we learned hwo to interpret data to understand more about the world. Today we're going to look at how to design algorithms so that a computer can use what we understand to make decisions automatically.

## Activity (40 mins)

### Creating the Algorithm

Distribute: Copies of the activity guide and resource.

Remarks

Imagine you wanted to use a computer to analyze someone's answers and make a recommendation automatically. A computer doesn’t know what “the beach” or “the big city” is and doesn’t have an opinion of its own. It will just be able to see which answer someone chose, not the significance of that answer. It needs a person to tell it what to do to turn the answer choices into a recommendation.

Introduce Activity: Read through the instructions as a class, ensuring that students understand how the algorithm works.

Discussion Goal

Ensure that students understand that the rule is based on the first row of the "Vacation and Food" table. There is no one "correct" rule based on the data, but someone who prefers ice cream seems very likely to prefer the beach and somewhat likely to prefer an amusement park.

Prompt: Based on what you see in the cross-tabulation tables, why do you think that someone created the first rule of the algorithm? Can you think of a better rule?

Make Rules: Have students individually decide on the rules for their algorithms. For each possible answer choice, the students should add points to at least one of the four options of beach, amusement park, national park, or big city.

### Testing the Algorithm

Group: Assign students into groups of 3-4

Once students have completed the algorithm, they should poll two other students and record their answers on the second page of the worksheet. They then use their algorithms to recommend a vacation spot for that person.

Share Decisions: Have groups share out what vacation spots were chosen based on different answer choices, and whether they feel the algorithm made a good recommendation. If they were not satisfied with the recommendations, encourage them to suggest changes to the algorithm.

## Wrap Up (5 mins)

Assessment Opportunity

Students should understand that automating decisions is convenient in many situations but may lose some elements that humans would consider in a decision. For example

• Collecting data that's already clean limits what you might collect.
• Automating decisions means sometimes you get a decision you wouldn't have made on your own

There are cases where we might want to automate a decision though. For example

• Where a human might forget / get bored (e.g. automatically re-ordering food when your fridge is low, turning on / off A/C as temperature changes)
• When there's lots of data to consider for a simple decision (e.g. looking through lots of products to find the one with the lowest price)

Review: This activity is closely tied with the data problem solving process. Review with students that process quickly and ask them to point out where they see data being collected, interpreted, and a decision being made. Ask them to point out any differences in the process now that a computer is making the decision.

Prompt: Use the Reflection section of the activity guide to have students reflect on the following three prompts

• What is a disadvantage of using an algorithm to make decisions?
• What types of decisions would you not want a computer to make automatically?

## Standards Alignment

#### CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
• 2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
DA - Data & Analysis
• 2-DA-08 - Collect data using computational tools and transform the data to make it more useful and reliable.
IC - Impacts of Computing
• 2-IC-22 - Collaborate with many contributors through strategies such as crowdsourcing or surveys when creating a computational artifact.