This cross-curricular lesson is designed for students in grades 2-3 and includes a tasty treat! Students will make connections between data analysis in computer science and data analysis in math by collecting, presenting, and interpreting data about the color of your favorite candy-coated chocolates. In addition, this lesson includes collaborative learning opportunities as peers will work together to discuss and analyze data. Students will love the hands-on, and delicious, nature of this lesson.
Grades K-2 | 1A-DA-06 – Collect and present the same data in various visual formats. |
1A-DA-07 – Identify and describe patterns in data visualizations, such as charts or graphs, to make predictions. | |
Grades 3-5 | 1B-DA-06 – Organize and present collected data visually to highlight relationships and support a claim. |
1B-DA-07 – Use data to highlight or propose cause-and-effect relationships, predict outcomes, or communicate an idea. |
2nd Grade | CCSS.Math.Content.2.MD.D.10 – Draw a picture graph and a bar graph (with single-unit scale) to represent a data set with up to four categories. Solve simple put-together, take-apart, and compare problems using information presented in a bar graph. |
3rd grade | CCSS.Math.Content.3.MD.B.3 – Draw a scaled picture graph and a scaled bar graph to represent a data set with several categories. Solve one- and two-step “how many more” and “how many less” problems using information presented in scaled bar graphs. For example, draw a bar graph in which each square in the bar might represent 5 pets. |
CCSS.Math.Practice.MP6 – Attend to precision. |
CCSS.Math.Practice.MP7 – Look for and make use of structure. |
Students will be able to collect and record data in an organized way, such as by using a data table.
Students will be able to create a bar graph to display the data they collect.
Students will be able to collaborate effectively to discuss any trends in their data, analyze and interpret bar graphs, and use reasoning to make predictions about similar sets of data.
at least 45-65 minutes in total
• The Building Blocks of Computer Science series, specifically Organizing Data
• Fun-sized packages of candy-coated chocolates or other candy that comes in a variety of colors (1 per student)
• Markers
• Pencils
• Scratch paper
• Chart paper or graph paper
• Group Data and Discussion Questions (1 per group)
• Teacher Example
• Data Analysis Exit Ticket (1 per student)
• Optional: online graphing tools, such as the National Center for Education Statistics’ Kids’ zone bar graph resource
Before engaging in this lesson, it would be beneficial for students to have read the Organizing Data book. They should understand the idea that there are many ways to organize data and that some organization formats work better than others in specific situations. Students should understand that this is true not just in computer science but in other areas, such as mathematics, as well.
In addition, students should be familiar with creating bar graphs as well as the vocabulary highlighted below.
Group Data and Discussion Questions, both written work and informal observations of discussion questions
Individual or team bar graph
Exit ticket
Analyze – to example carefully in detail, especially to determine why something has happened or may be expected to happen
Bar Graph – a chart or graph of a comparison of quantities by means of darkened rectangles of various lengths, each of which represents a particular quantity
Data – things known or granted; information; facts
Data Table – a way to organize data
x-axis – the horizontal axis in a system of rectangular coordinates, as on a chart or graph
y-axis – the vertical axis in a system of rectangular coordinates, as on a chart or graph
Because this activity involves group work, consider strategic grouping strategies and determine student groups ahead of time. Look to place one leader as well as a student who is confident in their handwriting skills in each group.
Time Guidelines:
Approximately 5-8 minutes
Teacher Actions
Hook students into the lesson by asking them to shout out the colors of whatever candy you chose to use for this lesson. List the colors where students can see and refer to them throughout the lesson: red, orange, yellow, green, blue, and brown. Then, dramatically pull out the individual packages of candy, theatrics encouraged! Explain to students that today they will combine their knowledge of data analysis in computer science with their knowledge of data analysis in math to collect, graph, discuss, analyze, and eventually eat, candy!
Use this as an opportunity to review your expectations about food safety and working with food in the classroom. Share your expectations for if, and when, students are allowed to eat their package of candy. (Wait until the class has finished the data collection portion of this task.)
Time Guidelines:
Approximately 10-15 minutes
Teacher Actions
Explain that students will begin by sorting their candies and recording how many of each color they received. Students can record their data however they choose during this stage.
Next, have students share how they chose to organize their data with their group. Explain that there are many ways to organize data efficiently. One way is by using a data table. Modify the list of candy colors you made during the Hook/Introduction into a data table as follows:
Color | Red | Orange | Yellow | Green | Blue | Brown |
Number |
Model how to complete the data table for your own individual package of candies. Consider using the Teacher Example to guide your model.
Pass out the Group Data Table and Discussion Guide sheet (1 per group) and instruct students to collaborate to complete the table for their combined data. Students should add up the total number of each color candy and record it on the collective data table. Explain to students one of the reasons they are combining their data is because it can be easier to see trends and analyze data when there are more values to consider.
Explain to students that they will create a bar graph similar to the one you are about to model, but they will use their group’s data rather than yours.
Model how to create a bar graph using your data. Include the following components in your model:
Consider modeling how to draw 2-3 bars worth of data, but adjust your model based on your students’ learning needs.
Time Guidelines:
Approximately 15-20 minutes
Teacher Actions
Provide time for groups to create bar graphs that include a title, labeled x-axis, labeled y-axis, and bars that correctly represent their data table. Depending on your students, determine if they are to create one bar graph per group on chart paper or individual bar graphs on graph paper.
Once students have completed their bar graphs, have them collaborate further to discuss the following questions:
Once students have finished their graphs and discussion questions, bring the class back to the whole group setting. Discuss connections between analyzing data and the study of computer science. Ask students why being able to collect, organize, and analyze data are good skills to have not just in math but also in the areas of computers and technology.
If you have time and believe it would be beneficial, consider extending the small group discussion students had to the whole group setting. You may use the same discussion guiding questions or extend students’ thinking further by asking them to compare groups’ data and graphs or to predict trends in the class’s data.
Time Guidelines:
Approximately 30-45 minutes
Teacher Actions
Transition to the independent application portion of the lesson where students will complete an exit ticket. Consider using this as a form of assessment.
On the exit ticket, students will be asked to answer mathematical questions about the data they collected and the graph they created. In addition, students will be asked about their analytical thinking skills and to reflect on this process.
Time Guidelines:
Approximately 5-7 minutes
Teacher Actions
Bring students back to the whole group setting and review the lesson’s objectives:
Praise students for their collaboration in collecting, organizing, graphing, and analyzing data and for their conversations about the connections between computer science and mathematics.
What went well?
What changes might be beneficial?
Reteaching Needs
Extension Needs