Lesson Summary

Summary

In this lesson, students will learn how to acquire and analyze data to find answers to questions and solutions to problems. Students will consider whether or not the data they are presented with is necessarily valid, and research some of the various data sources online.

Outcome

  • Students will explore how computation can be employed to help people process data and information to gain insight and knowledge.
  • Students will learn how computation can be used to facilitate exploration and discovery when working with data.
  • Students will consider what considerations and trade-offs arise in the computational manipulation of data.
  • Students will explore opportunities that large data sets provide for solving problems and creating knowledge.

Overview

Session 1

  1. Getting Started (5 min) - Students journal on the importance of validating data
  2. Discuss journal prompt (5 min)
  3. Brainstorm types of online data (5 min)
  4. Explore how meaning is created from data (10 min)
  5. Work with data online (20 min)
  6. Assign homework (5 min)

Session 2

  1. Getting Started (5 min) - Students journal about what they learned the previous day
  2. Analyzing Data (30 min) - Discuss correlation and causation; discuss and explore different types of data and analysis
  3. Present homework findings (10 min)
  4. Wrap Up - Journal (5 min)

Learning Objectives

CSP Objectives

Big Idea - Data
  • EU 3.1 - People use computer programs to process information to gain insight and knowledge.
    • LO 3.1.2 - Collaborate when processing information to gain insight and knowledge. [P6]
  • EU 3.2 - Computing facilitates exploration and the discovery of connections in information.
    • LO 3.2.1 - Extract information from data to discover and explain connections or trends. [P1]
    • LO 3.2.2 - . Determine how large data sets impact the use of computational processes to discover information and knowledge. [P3]

Key Concepts

Students will be able to acquire data and analyze it to find answers to a specific question or solutions for a specific problem.


Essential Questions

  • What opportunities do large data sets provide for solving problems and creating knowledge?

Teacher Resources

Student computer usage for this lesson is: required

Student computer usage for this lesson is: optional

Teacher Resources

In the Lesson Resources Folder

  • PowerPoints: "Finding Data" and "Finding and Analyzing Data" 
  • Session 1 Homework: "Homework Unit 4 Lesson 1"

Webpages Session 1

Webpages Session 2

Lesson Plan

Session 1

For this session, use the presentation "Finding Data" in the Lesson Resources Folder.

Getting Started (5 min)

Given this data: [slide 1]

A blood drive at the local high school reveals that 20% of the students were HIV positive.

Journal on these questions:

  • What is your immediate reaction?
  • What questions do you have?

Activities (40 minutes)

Activity 1 (5 min) - Discuss the journal prompt

Lead the students in discussion using the bullets below and slide 2 of the PowerPoint as guidence. Students should talk about WHY they assumed the data was true, or were uncomfortable questioning the truth of the data. 

Activity 2 (5 min) - Brainstorm: What kinds of data can be found online?

Part 1 - Discussion

Data comes from many places and takes many forms [slide 3]

  • Have students discuss: How do business, personal, government and devices create use data?

Part 2 - Brainstorm

Brainstorm as a class: what kinds of data are generated? Possible answers:

  • video: movies, webcam images, CCTV, youTube, Netflix, Facebook, etc.
  • pictures: maps, Instagram, photos, cartoons, drawings, …. everything!
  • words: books, articles, news, stories, blogs, Facebook
  • numbers: facts, financial transactions, scientific data
  • sound: music, speech
  • behavior tracking: GPS, click behavior, search history

Activity 3: How is meaning created from data? (10 minutes)

  1. Look at some data gathered about selfies from different cities around the world. [slide 4]  
    • Main ideas:
      • You have to gather the data and analyze it to create meaning. 
      • Creating meaning from pictures still takes some human interpretation.
    • Prompt students to come to a conclusion about the graphed data on the page.
    • Question for discussion: How large of a sample is needed to draw a conclusion?
  2. Quick review: Make the point that there is a LOT of data even in a single picture. [slide 5]
    1. Define these and put them in order. Use this webpage to review bytes: http://highscalability.com/blog/2012/9/11/how-big-is-a-petabyte-exabyte-zettabyte-or-a-yottabyte.html
      • MB, bit, TB, ZB, byte, GB, pixel (one dot of color on the screen), KB, PB
    2. Look at the photo on slide 5.
      1. 365 gigapixels is 365 billion pixels, if the picture is a square, then it is 604,152 pixels on each side (too big to fit on any HDTV screen) 
      2. http://www.rtings.com/info/what-is-the-resolution  A 4K super high resolution TV is only about 3,000 X 2,000 pixels. Even a movie screen can’t show all of the detail!
      3. https://www.amctheatres.com/sony4k, you can only look at it one part at a time.
    3. Preview Wolfram Alpha, an engine for providing knowledge from data.

Activity 4 (20 min) - Work with some data online

  1. Students should complete the Data Search and Analysis Handout. [slide 7]
    • Depending on how much time you have, you can pair students and assign even/odd questions or chunks of questions to different groups, or have each student research on their own.
  2. If there’s time in class, try to go over results and compare (especially the first 5) to see if people got similar answers. Why or why not? [slide 8]

Assign Homework (5 minutes)

Give students the worksheet: Homework Unit 4 Lesson 1.

There are 10 videos to choose from, each 10-15 minutes long. Either allow students to self-select, or assign them a particular video. Students should watch the video and answer the questions on the worksheet. This is an opportunity to discuss plagiarism: students are expected to watch the video and write from their own experience.

Session 2

For this session, use the presentation: Finding and Analyzing Data from the Lesson Resources Folder

Getting Started (5 min)

Students should journal on the following:  Describe at least 2 ways that we create meaning out of data. [ slide 1]

  • Possible answers: graph it, total it, average it, find min and max, map it, compare it to other data, find trends, generate predictions (like weather), draw conclusions (facial recognition, emotions, voice inflection), diagnose diseases, discover new stars, etc.

Activities (40 min)

Activity 1 (35 min): Analyzing Data

Part 1: Correlation vs. Causation

  1. Look at slide 2 from the PowerPoint. Creating meaning from data can be misleading.
  2. Point out that the graph shows a direct relationships between the number of divorces in Maine and the amount of margarine that is purchased. When one goes up, the other does too, and vice versa. Is this a causal relationship?
    • Show some examples from the Tyler Vigen website http://www.tylervigen.com/spurious-correlations . It has many examples of data connections that may be statistically valid but don’t make sense.  The site was created to point out how comparisons due to data correlation are often not valid. 

Part 2: Data Science

    1. What does a data scientist do? [slide 3]
      • Show the two videos and discuss.
      • Tricks to analyzing big data:
        • Knowing what data to use, and what to disregard.
        • Knowing how to make up for missing data.
        • Knowing how to discover and predict trends and correlations.
      • There are many degrees offered in data science, and free online courses are available from Udacity and Coursera, among others.
    2. Look at 3 false assumptions about big data [slide 4]:
      1. It’s complete and accurate
      2. It tells the whole story
      3. Bigger is better
    3. What considerations and tradeoffs arise in the computational manipulation of data? [slide 4]
      1. How do you account for missing data?
      2. How do you certify your sources?
      3. How do you decide which data to include and which to exclude?
      4. How much data is enough? (time is money!)
      5. Are your processing algorithms accurate?
    4. What is some of the data needed to successfully fly a space mission? (Possible answer: Knowing all about the spacecraft: speed, direction, amount of fuel/oxygen left.) The same problems that applied to early space missions are some of the same problems faced in dealing with big data.
      • You need to decide which factors to include in your calculations, and which to exclude.
      • You need to decide when to make an assumption for missing data or when to estimate.
      • In writing a program for an early space flight there are many unknown factors using a space craft that has never flown before.
      • It’s usually impossible to create a perfect algorithm that can take into account every possibility, so how do you allow for errors and changes?
    5. What are some of the calculations needed? (Possible answers: how much fuel to release and with which engines.)
      • They had to run many simulations first to see what would happen under various circumstances.
    6. See if anybody knows how NetFlix, movie makers, or Amazon use data about their customers to be more successful. [slide 5] http://www.smartdatacollective.com/bernardmarr/312146/big-data-how-netflix-uses-it-drive-business-success and http://www.fastcompany.com/3024655/pitch-perfect-and-how-analytics-are-transforming-movie-marketing

Businesses like Amazon and NetFlix learn the habits of different customers and make recommendations based on their previous choices and others who share similar characteristics (like Google ads).

See if anybody knows the story of Moneyball (based on a true story) of how a baseball team made decisions based on data analysis to become winners, https://en.wikipedia.org/wiki/Moneyball_(film) and how Vivek Ranadivé--who knew little about basketball but owned a multi-million dollar computer processing company and knew how to choose and analyze data--coached his then twelve-year-old daughter’s National Junior Championship basketball team to the national championship game.  He relied upon his sporting knowledge of soccer and cricket paired with his analytic mindset, to create a system of play which allowed his relatively un-athletic team to excel.  From the moment that he used intellect and his business experience to coach an inexperienced team to the championship game, the man who once thought basketball was “mindless” was hooked on the sport. http://www.forbes.com/sites/aliciajessop/2013/05/28/why-the-kings-are-staying-in-sacramento-meet-vivek-ranadive/

  1. How is data analyzed? Data analysis requires an algorithm, a plan to collect and process data. [slide 6]
    1. Generate discussion about what data is collected and how it is analyzed. What is a possible algorithm for making a decision about choosing what movies NetFlix might suggest for a customer?
    2. http://www.smartdatacollective.com/bernardmarr/312146/big-data-how-netflix-uses-it-drive-business-success
      Brainstorm: what other data might they collect? (what’s currently popular in that age group, demographic, etc.)
  2. Choose one of the options and write an outline of an algorithm: choosing a movie to produce or a sports player to hire. [slide 7]
    1. Describe at least two calculations needed
    2. Describe some of the data you’d need to collect.
    Share and discuss.

Activity 2 (5 min): Present homework from previous day after watching TED talks on data. [slide 8]

If time is short, choose only 1 or 2 of the questions from the homework to be presented to the class and collect the rest to grade.

Journal (5 min)

In your writing journal, map out the steps to answer a specific question or find a solution to solve a specific problem using data. 


Options for Differentiated Instruction

Extension Activities:

Data analysis activities from NOAA, NASA, and more! - http://climate-expeditions.org/educators/activities.html

Differentiation Instruction:

What is data acquisition? - http://www.ni.com/data-acquisition/what-is/

Data analysis and graphs (with Excel sample) - http://www.sciencebuddies.org/science-fair-projects/project_data_analysis.shtml

Collecting and analyzing data - http://ctb.ku.edu/en/table-of-contents/evaluate/evaluate-community-interventions/collect-analyze-data/main

Using Excel for Handling, Graphing, and Analyzing Scientific Data: A Resource for Science and Mathematics Students - http://academic.pgcc.edu/psc/Excel_booklet.pdf

 

 

 

 


Evidence of Learning

Formative Assessment

Journal day 1: 

Given this fictitious data:

A blood drive at the local high school reveals that 20% of the students were HIV positive.

  • What is your immediate reaction?
  • What questions do you have?

Journal day 2:  Describe at least 2 ways that we create meaning out of data.

Homework: Feedback from a TED video on big data

 


Summative Assessment

Students complete the Data Search and Analysis student activity.

Write an outline of an algorithm to make a data-based decision about what movie to produce or what sports team member to hire.

Lesson Summary

Summary

Students will define and identify models and simulations. They will work in groups to propose a simulation that could be used to investigate a hypothesis.

Outcomes

  • Students will identify real-world examples of models and simulations.
  • Students will understand that models and simulations are used to generate new knowledge, as well as to formulate, refine, and test hypotheses.
  • Students will understand that simulations allow hypotheses to be tested without the constraints of the real world.

Overview

  1. Getting Started (5 min)
  2. Introduction to Content (10 min)
  3. Guided Activities (30 min)
    1. Define and Identify Models and Simulations [10 min]
    2. Use Models and Simulations to Answer Questions [20 min]
  4. Wrap Up (5 min)

Source

Some of the ideas in this lesson were adapted from the CS10K community site, https://sites.google.com/site/mobilecsp/lesson-plans/realworldmodels.

Learning Objectives

CSP Objectives

Big Idea - Abstraction
  • EU 2.3 - Models and simulations use abstraction to generate new understanding and knowledge.
    • LO 2.3.1 - Use models and simulations to represent phenomena. [P3]
    • LO 2.3.2 - Use models and simulations to formulate, refine, and test hypotheses. [P3]

Math Common Core Practice:

  • MP4: Model with mathematics.

Common Core ELA:

  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text

NGSS Practices:

  • 2. Developing and using models

Key Concepts

  • Models and simulations are used to generate new knowledge, as well as to formulate, refine, and test hypotheses.
  • Simulations allow hypotheses to be tested without the constraints of the real world.

Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?

Teacher Resources

Student computer usage for this lesson is: optional

These videos supplement the material covered in this lesson:

 

Lesson Plan

Getting Started (5 min)  

  • Journal: If I flip a coin 10 times, is it possible to predict exactly how many times it will come up heads?
    • Why or why not? Connect prior knowledge of probability to the use of models and simulations.
  • Ask: When you flip a coin, what is the probability of heads? (Students will answer 50% or 1 out of 2, etc.)
  • Flip a coin 5 times and record the result. Ask: What is the probability the next result will be heads? (Students should answer 50% again.)
  • Discuss with the students the difference between theoretical probability and experimental probability.

Introduction to Content (10 min)

Introduce Vocabulary

  • Theoretical probability is the exact probability of a situation, taking every factor into account. (The chance of heads is 1 result out of 2 possible outcomes:  1/2 = 50%.)
  • Experimental probability is basically a guess of the theoretical probability of an event using knowledge of the relative frequency of the event occurring (calculating using test or simulation data: 30 heads / 50 flips = 60%).

Most of the time we need to use experimental instead of theoretical probability. Have students think about this as they answer the following questions with a partner:

  • What are the chances that it will rain tomorrow?
  • How many hits will your favorite baseball player make in his next game?
  • If you toss a crumpled sheet of paper into the recycle bin from across the classroom, how likely is it to make it in?

Discussion: As a whole class, discuss how the students determined their answers to each question. (Did some students want to use the computer to access data or actually perform the paper throwing experiment?)

Use the above examples to define models and simulations to the students:

  • Will it rain? Using a meteorological model, a meteorologist will run a program with current data for the forecast (simulation).
  • How many hits? Use the player's batting average (the mathematical model) to calculate the number of hits in an average game (the simulation).
  • How many "baskets"? The paper and basket are the model; running the trials is the simulation.

 (Vocabulary from: http://www.systems-thinking.org/modsim/modsim.htm.)

Guided Activities (30 min)

Define and Identify Models and Simulations [10 min]

Examples of models (do not need to show the entire videos for student understanding):

  • Watch this video of a human heart simulation: Multi-scale Multi-physics Heart Simulator UT-Heart (5:15) (watch up to 2:00; the rest is interesting but not necessary).

  • What’s an advantage to having so many data points? What about a disadvantage? (A supercomputer is necessary to run the simulation.)

  • How can you test a parachute to be used on Mars? https://www.youtube.com/watch?v=_jOzxEOlDJg (1:11)? Describe the physical test. Before that test, they create models and simulate on the computer - why? (It is very costly to run a test and to create an actual parachute. First be sure an idea passes a simulated test, then build it.)

  • Freedom Tower & WTC Buildings in Minecraft (3:01, start video at 1:09) https://www.youtube.com/watch?v=kWfNcjSw_3c (Could lead to a discussion of the limitations of modeling in Minecraft.)

Have students list models they have seen (and have interacted with) in each of the following (time permitting, have the students find websites to share):

  • Entertainment (e.g., a dragon for a movie)
  • Military (e.g., a tank or airplane)
  • Medical (e.g., bacteria or the human body)

Examples of Simulations:

Have students find and share simulations in each of the following:

  • Financial (e.g., stock market forecasting)
  • Weather (e.g., predicting the path of hurricanes)
  • Space (e.g., predicting the path of an asteroid)

Use Models and Simulations to Answer Questions [20 min]

In this activity, the class will match a person and a character in a contest and propose models and simulations to predict the winner.

Have the class suggest people, characters, and activities to fill the chart (start with a blank chart; entries below are for example only):

Person Character Activity
RG III Sponge Bob Ping-pong
Bill Gates Elektra Jeopardy

Shakira

Harry Potter Cooking
  • Select one item from each column and propose a competition: What if Bill Gates played Harry Potter in a game of ping-pong -- who would win?
  • Students should propose an answer (their hypothesis).
  • As a class, what characteristics of the person (that can be evaluated and quantified), the character, and the activity helped them choose their answer (such as athleticism, coordination, height for the models, or different serves and returns for the game play)?
  • Have students work in pairs to identify the models (characteristics of the person and character) and the simulation (the game play) that would be incorporated into a program to determine the winner. After a few minutes, merge pairs into small groups to compare. As a class, discuss what characteristics do not need to be taken into account for the modeling and simulation. Did anyone worry about hair color, age, or the weather?
  • Give each group a large sheet of paper and markers. Have the students select a new person, character, and activity. Create descriptions of the models and simulation in a new program to determine the answer.
  • After 10 minutes, each group should post their proposal and have the class complete a "Gallery Walk" to compare and contrast the results.

Wrap Up (5 min)

Journal: Have students record the definitions (in their own words) of the vocabulary used in this lesson: probability, model, simulation, and hypothesis.


Evidence of Learning

Formative Assessment

  • Can students define models and simulations in their own words (and understand the difference)?
  • During the activity, are students able to identify particular characteristics that will be included in a model and simulation as well as characteristics that are to be excluded?

Lesson Summary

Summary 

Students will formulate a hypothesis, run simulations, and analyze the results to determine what needs to be modified in their hypothesis and/or the simulation itself.

Outcomes

  • Students will identify and create real-world examples of models and simulations.
  • Students will use models and simulations to generate new knowledge and to formulate, refine, and test hypotheses.
  • Students will use simulations to test hypotheses without the constraints of the real world.

Overview

  1. Getting Started (10 min)
  2. Guided Activities (35 min)
    1. Activity 1 - Rolling Dice Simulation, materials - large paper and markers or other method to share group work [15 minutes]
    2. Activity 2 - Using a Simulation to Test a Hypothesis [20 minutes]
  3. Wrap Up (5 min)

Source

The coin flipping extension is based on a CS10K lesson: https://sites.google.com/site/mobilecsp/lesson-plans/lp-coinflip-miniprojects

Learning Objectives

CSP Objectives

Big Idea - Abstraction
  • EU 2.3 - Models and simulations use abstraction to generate new understanding and knowledge.
    • LO 2.3.1 - Use models and simulations to represent phenomena. [P3]
    • LO 2.3.2 - Use models and simulations to formulate, refine, and test hypotheses. [P3]
Big Idea - Data
  • EU 3.1 - People use computer programs to process information to gain insight and knowledge.
    • LO 3.1.2 - Collaborate when processing information to gain insight and knowledge. [P6]
Big Idea - Algorithms
  • EU 4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
    • LO 4.1.1 - Develop an algorithm for implementation in a program. [P2]

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP3: Construct viable arguments and critique the reasoning of others.

Common Core Math:

  • F-BF.1-2: Build a function that models a relationship between two quantities
  • S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable

Common Core ELA:

  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • RST 12.9 - Synthesize information from a range of sources

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

Students will be able to:

  • identify and create real-world examples of models and simulations.
  • use models and simulations to generate new knowledge and to formulate, refine, and test hypotheses.
  • use simulations to test hypotheses without the constraints of the real world.

Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How are programs developed to help people, organizations or society solve problems?

Teacher Resources

Student computer usage for this lesson is: required

The PowerPoint "Using Data and Simulations" can be found in the Lesson Resources folder.

Penny Bias article to go with lesson extension: http://mathtourist.blogspot.com/2011/02/penny-bias.html

For the Monty Hall Problem extension:

Online simulation of the problem: http://math.ucsd.edu/~crypto/cgi-bin/MontyKnows/monty2?1+17427

There are several videos on YouTube demonstrating and explaining the Monty Hall Problem.

An animated video: https://www.youtube.com/watch?v=mhlc7peGlGg length is 5:48

Live action video: https://www.youtube.com/watch?v=4Lb-6rxZxx0 length is 5:30

There is sample code for the die Python program in the Lesson Resources Folder called 4-3 Sample Code.py

Lesson Plan

Getting Started (10 min)

Journal:

  1. Describe a situation that can be modeled by rolling one die.
  2. Describe a situation that can be modeled by rolling two dice.
  3. (Consider possible outcomes and the likelihood of each outcome.)

Have students share their answers with the class.

Guided Activities (35 min)

Activity 1 (15 min) - Designing a Simulation (rolling dice)

  1. Arrange the class into small groups (two or three).
  2. The groups are to develop an algorithm and write a program to simulate rolling a standard six-sided die.
    • The program should ask for the number of rolls and display the results (number of each possible outcome that was rolled).
    • Note: The students will need to use the randint function to write this code.
      • import random at the top of the code
      • random.randint(min,max) returns a 'random' integer between the min and max values (inclusive).
    • Remind students to use functions where appropriate.
    • Students are encouraged to write their plan (flow chart or pseudocode) on large paper or some other method to enable later sharing with the class.
  3. Have a representative from each group describe their plan for the algorithm. (After the first group, subsequent groups could highlight similarities and differences.)
  4. Next, have each group discuss and implement changes to their algorithm and programs to simulate rolling two dice. (When providing directions, ask the class how using functions in the previous exercise would make this change easier to implement.)
  5. As a class, discuss how many times the program should "roll" the dice. (Be sure students note that every possible value should be displayed, especially upper and lower bounds.)

Activity 2 (20 min) - Using a Simulation to Test a Hypothesis

  1. Each group should develop a hypothesis to answer the question: Can a twelve-sided die be used in place of rolling two six-sided dice? Each group should agree on a hypothesis and write it down.
  2. The groups already have a design for rolling two six-sided dice. They should now design an algorithm for rolling a twelve-sided die. (This process can involve creating a new function or modifying the current function's parameters to accept the number of sides.)
  3. The students should be paired up and begin writing the code necessary to test the hypothesis. 
  4. Once they finish the code, students should run both simulations to compare results. Note: Students need to save their code. They will be using it in the next lesson's homework.
  5. As students complete their simulations, if possible, have each pair share their data with the class (in a spreadsheet displayed by the teacher's computer, or on the white board, or large paper).
  6. As data is collected, students should determine whether their hypothesis was correct or whether it needs to be modified. 
  7. Analyze with the class if the simulations themselves were implemented correctly. (Does the data represent the expected theoretical outcomes? How can you modify the program to correct any errors?)

Wrap Up (5 min)

Ask the class: Does your program represent a sufficient simulation for rolling dice? What are the advantages/disadvantages of using a program vs. actual dice? 

Journal: Summarize how a program can be used as a simulation to test a hypothesis.


Options for Differentiated Instruction

Students can be provided with the code for a function to simulate rolling one die and use it to develop the rest of the program.

After the first group activity, the teacher can swap a student from each group to allow different input into the next group activity.

 

Extension #1 - Penny Flipping

This extension is based on advanced mini project # 4, which can be found here:  https://docs.google.com/a/smcps.org/document/d/1AKHpiQ87bE4W1YzHlAFh2uNAHuEtdMOCQVV6HfxfDzc/edit 

Students read an article about the 'randomness' of flipping a penny: http://mathtourist.blogspot.com/2011/02/penny-bias.html

Next, students should hypothesize the results of lining up 10 pennies on edge and knocking them over (as described in the article). Students need to determine how many times to run the experiment, collect data, and analyze the results. 

Students should work in pairs to write a computer simulation for the penny experiment. (Note: this is a program based on experimental data, not theoretical.)

Discuss as a class the validity of the simulation written. Can this simulation be used for other coins?

Extension - The Monty Hall Problem

In the game show "Let's Make a Deal", the original host was Monty Hall. Onvery show, Monty would present a player with three doors or curtains to choose from. The contestant was asked to choose a door in search of a prize. After making a selection, Monty Hall would open one of the doors not selected by the contestant to reveal a non-prize (perhaps a goat). Then Monty would ask if the contestant wanted to change their choice.

After explaining the show to the class ask, "Should the contestant change?" Students should propose a hypothesis.

Have the students design a simulation to test their hypothesis (discuss what is the data collected and the number of times the simulation should run to collect data). After running the simulation, students should evaluate their hypothesis and determine whether it needs to be modified or whether the simulation needs to be modified.

If Monty Hall had four doors, what should the contestant do?

What should the contestant do if they know that Monty does not know what is behind each door?

Online simulation of the problem: http://math.ucsd.edu/~crypto/cgi-bin/MontyKnows/monty2?1+17427

There are several videos on YouTube demonstrating and explaining the Monty Hall Problem.

An animated video: https://www.youtube.com/watch?v=mhlc7peGlGg length is 5:48

Live action video: https://www.youtube.com/watch?v=4Lb-6rxZxx0 length is 5:30


Evidence of Learning

Formative Assessment

Review student journal entries and class discussions to determine students' understanding of simulations, a hypothesis, and the ability to determine a method to test a hypothesis.


Summative Assessment

Describe an algorithm to simulate drawing an ace of any suit from a standard deck of cards. 

Make a hypothesis about drawing cards from a standard deck of cards and determine how to collect data to answer your hypothesis.

Lesson Summary

Summary

This lesson introduces students to reading information from an input file and writing to an output file as a functionality of Python programming. The students will then apply these concepts to program a simple Dice Roll application to generate data. This lesson will prepare students to read and write files for use in later Data Acquisition lessons.

Outcomes

  • Students will learn how to read from an input data file and write to an output file using the Python programming language.
  • Students will be able to apply their new knowledge to writing independent programs.

Overview

Session 1

  1. Getting Started (10 min) - Journal on the possible advantages/disadvantages of being able to input/output data.
  2. Book activity (40 min) - Students are guided through the properties of file I/O using the "Python for Informatics" book.

Session 2 

  1. Python Lab (50 min) - Students write a program to roll 2 six-sided dice and one 12-sided die and write the output to a file. They then import it to Excel as a txt or csv file and compare distributions using countif. (This exercise may be assigned as homework if students have the computing resources to complete a programming assignment as homework.)

 

Learning Objectives

CSP Objectives

Big Idea - Creativity
  • EU 1.2 - Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
    • LO 1.2.3 - Create a new computational artifact by combining or modifying existing artifacts. [P2]
Big Idea - Abstraction
  • EU 2.3 - Models and simulations use abstraction to generate new understanding and knowledge.
    • LO 2.3.1 - Use models and simulations to represent phenomena. [P3]
Big Idea - Data
  • EU 3.2 - Computing facilitates exploration and the discovery of connections in information.
    • LO 3.2.1 - Extract information from data to discover and explain connections or trends. [P1]
  • EU 3.3 - There are trade-offs when representing information as digital data.
    • LO 3.3.1 - Analyze how data representation, storage, security, and transmission of data involve computational manipulation of information. [P4]
Big Idea - Programming
  • EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
    • LO 5.1.2 - Develop a correct program to solve problems. [P2]

Key Concepts

The students must understand how to open and read from an input file using Python.

The students must understand how to declare and write to an output file using Python.


Essential Questions

  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How do people develop and test computer programs?

Teacher Resources

Student computer usage for this lesson is: required

Python for Informatics by Charles Severance, http://www.pythonlearn.com/book.php.

Explanation of the CountIf function in Excel http://office.microsoft.com/en-us/excel-help/countif-HP005209029.aspx.

The mbox.txt and mbox-short.txt files are in the Lesson Resources Folder.

 

Lesson Plan

Session 1

Getting Started (10 min)

Think-Pair-Share

What are the advantages and disadvantages of:

  • Getting input data from the keyboard?
  • Showing output on the video display?

Have students review their journal entries as a class and note the advantages and disadvantages on a white board.

Guided Activity (40 min)

Before Starting The Activity:

  • Have the students open the book Python for Informatics by Charles Severance http://www.pythonlearn.com/book.php and navigate to Chapter 7 "Files" (page 79).
  • Students should also open PyCharm or the Runestone coding environment and create a new .py file. (Teachers may want to project PyCharm and the textbook on the board.)
  • The two files mbox.txt and mbox-short.txt are located in the Lesson Resources Folder. Students will need to have these saved in the same folder as their python file for the lesson.

Chapter 7: Files

The students should code the examples in the book as the teacher proceeds through the lessons.

  1. Section 7.1 Persistence
    1.  Emphasize the disadvantages of the loss of information when the computer is powered off and the frequent need to store data in a more permanent location.
    2. Introduce the concept of secondary memory.
  2. Section 7.2 Opening Files 
    1. After reading the brief text in Section 7.2, have students type the sample code to open the mbox.txt file and run it.
    2. Have students try to open another nonexistent file and see what kind of error they get.
    3. Check the student’s code for understanding:
      • Were the students able to open the mbox.txt file successfully?
      • Did the students get a “No such file or directory” error message when they attempted to open a nonexistent file?
  3. Section 7.3 Text Files and Lines
    1. Introduce the newline special character “end of line” which breaks the file into lines. In Python the newline is represented by “\n” in string constants.
    2. Have the students type in the sample code in 7.3 (page 81), which demonstrates the newline character’s function.
    3. Check the student’s code for understanding  
      • Did the “\n” cause the string to be displayed on two lines?
  4. Section 7.4 Reading Files
    1. Introduce the notion of reading each line in a file by using a while loop. (The students should already be familiar with for and while loops, but may need a quick review of the syntax.)
    2. Have students count the lines in the mbox.txt file by running the first sample code in 7.4 (page 82).
    3. Check the students’ code for understanding.
      • Does your code give the same output as in the book?
  5. Section 7.8 Writing Files
    1. Show the students how to open a file for writing by opening it with mode 'w' as a second parameter.
    2. After reading the brief text in Section 7.8, have students type the sample code to write to the output.txt file and run it. Remind them to use the newline character, “\n”, at the end of each line.
    3. Check the student’s code for understanding:
      • Were the students able to write to the output.txt file successfully?
      • Did the students remember to close their output file when finished? 

Session 2

Python Lab (50 min) 

Preparation:

Part 1:

  • Open the Python program(s) for rolling two six sided and one twelve-sided dice (students should have saved this from lesson 4-3).
  • Edit the code so it rolls the dice 1000 times and write the results of each roll to an output file named diceRolls.dat.

Part 2:

  • Import the diceRolls.dat file into your spreadsheet software (such as Excel) either as text or cvs file type.
  • Make use of the countif function to compare the distribution of the rolls for how many times each number 2 through 12 was rolled with the pair of six-sided dice to the distribution for the 12-sided die.
  • Show the comparison visually with an appropriate chart in your spreadsheet software.

 


Options for Differentiated Instruction

Have students work in pairs as the new concepts are introduced and practiced.

For a class needing more scaffolding: Work as a group. Have students take turns around the room to read aloud the brief text in each section in Chapter 7. Do the short exercises together with a "row captain" assigned to each row (or group) in the classroom who is in charge of checking that everybody in their row has completed each short task and has gotten the help needed to finish. Row captains help each other until the entire class has successfully completed each task. Report out on what challenges were encountered, recording problems and solutions at the front of the classroom as the class works. Rotate the role of row captain for each section.

For more independent students: Introduce/demonstrate the key ideas first and then allow student to work through Chapter 7 at their own pace.


Evidence of Learning

Formative Assessment

The teacher will check the student’s code for understanding.

The teacher will check for understanding as each new concept is introduced.

 


Summative Assessment

Exercise 7.1 Write a program to read through a file and print the contents of the file (line by line) all in upper case. Executing the program will look as follows:

python shout.py

Enter a file name: mbox-short.txt

FROM STEPHEN.MARQUARD@UCT.AC.ZA SAT JAN 5 09:14:16 2008

RETURN-PATH: <POSTMASTER@COLLAB.SAKAIPROJECT.ORG>

RECEIVED: FROM MURDER (MAIL.UMICH.EDU [141.211.14.90])

BY FRANKENSTEIN.MAIL.UMICH.EDU (CYRUS V2.3.8) WITH LMTPA;

SAT, 05 JAN 2008 09:14:16 -0500 

You can download the sample input file from www.py4inf.com/code/mbox-short.txt

Exercise 7.2 Write a program to prompt for a file name, and then read through the file and look for lines of the form:

X-DSPAM-Confidence: 0.8475

When you encounter a line that starts with “X-DSPAM-Confidence:” pull apart the line to extract the floating point number on the line. Count these lines and the compute the total of the spam confidence values from these lines. When you reach the end of the file, print out the average spam confidence.

Enter the file name: mbox.txt

Average spam confidence: 0.894128046745

Enter the file name: mbox-short.txt

Average spam confidence: 0.750718518519

 

Test your file on the mbox.txt and mbox-short.txt files. 

Lesson Summary

Pre-lesson Preparation

Your students will need computers for this lesson. If you would like to show students a working dartboard simulation (with a circular dartboard), check that your browser can run a Java plug-in. Be sure to update, activate, and disable the plug-in as needed for security purposes.

Summary

In this lesson, students will explore basic data analysis concepts in Python, learn about code extensibility, create a simple simulation from scratch, and reuse their code to make a more elaborate simulation.

Outcomes

  • Students will create a mathematical simulation and understand how programming can be used to model real-world processes.
  • Students will understand extensibility and code reuse by developing a simulation and modifying it to solve a more complex task.
  • Students will be able to reason about and solve a problem by programming a solution from scratch.
  • Students will collect and analyze data.

Overview

Session 1:

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
  3. Optional Homework

Session 2:

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
  3. Homework

Part of this lesson was adapted from http://www.nzmaths.co.nz/resource/dartboards and http://www.nzmaths.co.nz/resource/more-dartboards.

Learning Objectives

CSP Objectives

Big Idea - Creativity
  • EU 1.1 - Creative development can be an essential process for creating computational artifacts.
    • LO 1.1.1 - Apply a creative development process when creating computational artifacts. [P2]
  • EU 1.2 - Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
    • LO 1.2.2 - Create a computational artifact using computing tools and techniques to solve a problem. [P2]
    • LO 1.2.3 - Create a new computational artifact by combining or modifying existing artifacts. [P2]
    • LO 1.2.5 - Analyze the correctness, usability, functionality, and suitability of computational artifacts. [P4]
Big Idea - Abstraction
  • EU 2.1 - A variety of abstractions built on binary sequences can be used to represent all digital data.
    • LO 2.1.1 - Describe the variety of abstractions used to represent data. [P3]
  • EU 2.3 - Models and simulations use abstraction to generate new understanding and knowledge.
    • LO 2.3.1 - Use models and simulations to represent phenomena. [P3]
Big Idea - Data
  • EU 3.1 - People use computer programs to process information to gain insight and knowledge.
    • LO 3.1.1 - Find patterns and test hypotheses about digitally processed information to gain insight and knowledge. [P4]
    • LO 3.1.3 - Explain the insight and knowledge gained from digitally processed data by using appropriate visualizations, notations, and precise language. [P5]
  • EU 3.2 - Computing facilitates exploration and the discovery of connections in information.
    • LO 3.2.1 - Extract information from data to discover and explain connections or trends. [P1]
Big Idea - Algorithms
  • EU 4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
    • LO 4.1.1 - Develop an algorithm for implementation in a program. [P2]
Big Idea - Programming
  • EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
    • LO 5.1.1 - Develop a program for creative expression, to satisfy personal curiosity, or to create new knowledge. [P2]
  • EU 5.4 - Programs are developed, maintained, and used by people for different purposes.
    • LO 5.4.1 - Evaluate the correctness of a program. [P4]

Key Concepts

The development of a program from scratch to solve a specific problem is presented to students by creating a simulation that lets them see how software can model a real-world process. Additionally, the concepts of extensibility and code reuse are shown through hands-on programming experience.


Essential Questions

  • How are algorithms implemented and executed on computers and computational devices?
  • How are programs used for creative expression, to satisfy personal curiosity or to create new knowledge?
  • How do computer programs implement algorithms?

Teacher Resources

Student computer usage for this lesson is: required

The Lesson Resources folder contains an example program showing how to use Python's random function to simulate tossing a coin.

An alternative lesson outline using Runestone and PyCharm to code a simulation and use it to develop, refine and test hypotheses in is the lesson folder. The lesson is in a file named "Monte Carlo Simulation to Calculate Pi.docx".

Lesson Plan

Session 1

Getting Started (5 min)

Think-Pair-Share: Writing programs "from scratch"

  • Ask your students to think about what it means to write a program "from scratch," how and why someone would do so.
  • Have your students pair off to share and list their ideas.
  • Collect and discuss their responses. Some topics to note could include: the importance of programming to solve a specific problem, the challenge of starting a program without copying someone else's code, and the value of learning to implement algorithms on one's own. The dartboard simulation used in this lesson provides a good example of a straightforward problem with a solution that someone can code on their own from scratch.

Guided Activity (45 min)

A Dartboard Simulation [10 min]

Get students' attention by asking them to play with the Dartboard Simulator (requires the Java browser plug-in) as they think about the following scenario and answer the related questions:

  • You have a circular dartboard consisting of three concentric circles. The largest outer circle has a radius of 3 units and is colored yellow. Inside that is the middle circle with a 2-unit radius, colored orange. In the center is a red circle, the bull's-eye, with a 1-unit radius. The final board looks like a red circle enclosed by an orange ring, enclosed by a larger yellow ring.
  • Now suppose you have a robot that throws darts randomly. How many darts would you expect to hit the bull's-eye if the robot throws 90 darts at your dartboard, assuming every dart hits the board? How many of those darts (on average) would hit the orange part of the board? How many would hit the yellow part?
  • To make the dartboard into a game, a certain number of points is awarded each time a dart hits a specific color. You want to assign score points to the dartboard fairly (for our random robot), such that the robot gets a score proportional to the chance it has of hitting a given color on the board. How many points should landing a dart on red be worth? On orange? On yellow?
  • Answers:
    • Recall that the formula for the area of a circle is A = pi*radius2. The red circle has an area of pi units. The orange ring has an area of 3*pi units (4*pi minus the area of the red circle). The yellow ring has an area of 5*pi units (9*pi minus 3*pi for orange and pi for red). The total area is 9*pi. Thus, on average, 50 of the darts would land on yellow, 30 of the darts would land on orange, and 10 darts would land on red.
    • For score assignment, since a single dart would hit yellow 5/9 of the time, orange 3/9 of the time, and red 1/9 of the time, we know that red is 5 times harder to hit than yellow and 3 times harder to hit than orange. Thus, a convenient assignment would be 15 points for red, 5 points for orange, and 3 points for yellow. With these score assignments, if the robot throws a dart it would score 5 points on average.

Devising a Dartboard Simulation [10 min]

Suppose you want to write a program that simulates tossing virtual darts. Each dart will land at a point on a square virtual dartboard that is one unit long on each side. Each point on this dartboard has both an x and a y coordinate, both of which are between 0 and 1. The bull's-eye is a square in the center of the dartboard with sides of length 0.5 units.

Have the program ask the user how many darts they want thrown. The program should then simulate throwing these darts by generating a random landing location (a random x and a random y coordinate) on the dartboard for each dart. Recall how to use Python's random functions (by reviewing the previous lessons' dice simulation). As darts are thrown, the program counts how many darts land within the center square, the bull's-eye. The bounds of bull's-eye are [0.25, 0.75] on both the x and y axes. Finally, the program should print out the number of darts thrown and the number that landed within that rectangle.

Have your students answer the following questions:

  1. Is the problem description clear enough that you could code this program on your own? If so, what information helps to make it clear? If not, what further explanations are needed?
  2. What are some variables you think your program will need, and what will you use them for?
  3. Are there any built-in Python functions that might be necessary or useful? If so, which ones?
  4. What other types of Python constructs are required for this program? Specifically, will you need an input assignment? A loop? An if statement? A print statement? What else?
  5. If you do need to use a loop, would it be better to use a while loop or a for loop in this program? Or will either work equally well? Why? If you think you can code the program without using a loop, explain why.
  6. Think back to the dice simulation you made. What are two or three ways in which your dartboard program will be similar to the dice simulation? What are two or three ways they will be different? 
  7. What percentage of darts thrown randomly at the dartboard will hit the bull's-eye? 

Programming the Simulation [25 min]

Take the rest of the class time to have your students begin programming their simulation. If they are not able to finish before the session ends, you may want to assign the program as homework, or devote the beginning of the second session to finishing the program. They will need their programs for the work in the next session.

You may want to remind students how to use Python's random function. The following code may be a useful example:

Example random coin flipping code (the python file is available in the Lesson Resources folder):

import random # Needed for random number generation

number_of_heads = 0

for i in range(0, 100):

x = random.random() # Generates a random floating point (decimal) number between 0 and 1

if x > 0.5:

number_of_heads = number_of_heads + 1

print "The number of heads in 100 coin flips is ", number_of_heads

Optional Homework

Have your students finish their dartboard programs, as they are needed in the next session. Alternatively, if they have finished their programs, you could assign the "Collecting and Analyzing Data" think-pair-share of the next session as a homework, to be discussed in the next session.

Session 2

Getting Started (5 min)

Journal: Making your programs extensible

  • Define "extensibility" for your students in the context of a program. Focus on the notion that we should plan for the future by keeping our code simple and organized logically. By doing so, we can more easily extend our code (add new features), reuse parts of our code in other programs, and more swiftly modify our program if the requirements change.
  • Have your students answer the following questions in their journals: "What are some reasons to make our programs extensible? What are some things that can go wrong if our code is not extensible?"

Guided Activity (45 min)

Collecting and Analyzing Data [10 min]

Think-pair-share: Collecting and analyzing data

  1. Ask your students to recall what percentage of darts randomly thrown will hit the bull's-eye.
  2. With the completed square dartboard program, have your students collect data by running their program entering increasing values for the number of darts to be thrown (1, 10, 100, 500, 1000, 5000, 10000, 50000, and so on), recording the output for each input (number of darts that hit the bull's-eye). For each pair of input and output, have them calculate the percentage that hit the bull's-eye (divide output by input, e.g., 12 hits / 50 thrown = 0.24, or 24% of the darts were hits).
  3. Have your students pair off and compare their data with that of their partner. Ask them to write down, for any trend they may notice in the data, why they think it is there. Have them recall when they calculated the probability of the robot throwing darts at a circular dartboard.
  4. Gather your students and discuss as a class what can be observed from the data. Ideally, as you increase the sample size (number of darts thrown), you should be getting a more accurate measurement of how many darts hit the bull's-eye. As with the dart-throwing robot, the area of the center relative to the whole dartboard determines the percentage that hit. In this case, the center square has an area of 0.25 units2, and the rest of the dartboard has an area of 0.75 units2, so approximately 25% of the randomly thrown darts will hit the bull's-eye.

Changing Requirements [30 min]

Discuss with your students how we often want to reuse our code for a new project, and how it is not uncommon when developing a program for the requirements to change. Both of these changes benefit from extensibility in code. Your students will get to test the extensibility of their dartboard program by reusing what they have to fit with a new objective: make a three-ringed circular dartboard.

As before, this program should first ask a user how many darts they would like to throw. Then, it should use that input to simulate throwing darts at a circular dartboard. Finally, it should print the number of darts thrown, the number of darts that hit the bull's-eye, the number that hit the middle ring, the number that hit the outer ring, and the number that missed completely. This circular dartboard is similar to the one from the previous session's robot exercise: it has a central circular bull's-eye surrounded by a middle ring, which is in turn surrounded by an outer ring. The coordinates for this dartboard are: the center is at coordinate (0,0); the outermost ring is a circle with radius of 3; the middle has a radius of 2; and the bull's-eye has a radius of 1. Simulate throwing a dart by picking random x and y coordinates, each between -3 and 3. Since this range is a square, some darts may miss the dartboard completely. For this program, students may reuse as much of their square dartboard code as they need, but make sure to preserve their original program separately.

Homework

Have your students finish their circular dartboard programs and answer the following questions:

  1. How extensible was your square dartboard simulation? How much code were you able to reuse for your circular dartboard simulation, and what did you need to write from scratch?
  2. What are the major differences between the code in the programs and the way you approached coding them? Which did you find more difficult to program? Would it have been easier or faster to code the circular dartboard program from scratch?
  3. Collect data by running the circular dartboard program with various increasing inputs (1, 10, 100, 500, 1000, 5000, and so on) and record the output. For each input and corresponding output, calculate the percentage of darts that missed, that hit the outer ring, that hit the inner ring, and that hit the bull's-eye. What trends do you see in the data? How is the behavior similar and different to the square dartboard program?

Options for Differentiated Instruction

Note: graphics.py may be used with this lesson to create a visualization - http://mcsp.wartburg.edu/zelle/python/ppics2/code/graphics.py


Evidence of Learning

Formative Assessment

The students will produce two simulation programs on their own: the square dartboard simulation and the circular dartboard simulation.


Summative Assessment

The students will record their understanding of extensibility in their journal.

The students will gain experience collecting data in both sessions.

The students will think analytically about their programs by answering the questions in Session 1 and in the homework for Session 2.

Lesson Summary

Note: This optional lesson is designed for advanced students and teachers who would like to introduce another programming tool and environment: NetLogo. Teachers may also choose to complete only the first session (on the basics of NetLogo), to expose students to a new computational platform and way of thinking, and to extend the ideas in Unit 4 about modeling and simulation.

 

Summary

This lesson teaches students to use simulations to develop and refine hypotheses, then use the simulations to test these hypotheses.  NetLogo, which is used throughout the lesson to illustrate the use of functional and data abstraction, is a programmable modeling environment for simulating natural and social phenomena. 

NetLogo uses an extension of Logo instead of Python, so students are not expected to write new code in this lesson.  See http://www.ianbicking.org/docs/PyLogo_lightning.html for a comparison of Logo and Python. 

Outcomes

  • Students will understand that models are abstraction of real environments and will recognize the rationale for and limitations of modeling techniques to analyze problems.

  • Students will recognize the use of functional and data abstractions in modeling.

  • Students will be able to develop and test hypotheses using an experimental approach in a modeling framework.

Overview

Session 1 - Modeling in NetLogo

  • Getting Started (8 min)
  • Learning NetLogo (40 min)
  • Wrapup (2 min)

Session 2 - Models and Hypothesis Design

  • Getting Started (5 min)
  • Models and Hypotheses (20 min)
  • Model Selection and Hypothesis Development (25 min)

Session 3 - Hypothesis Testing

  • Getting Started (5 min)
  • Hypothesis Testing (40 min)
  • Wrapup (5 min)

 

Learning Objectives

CSP Objectives

Big Idea - Creativity
  • EU 1.2 - Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
    • LO 1.2.4 - Collaborate in the creation of computational artifacts. [P6]
Big Idea - Abstraction
  • EU 2.2 - Multiple levels of abstraction are used to write programs or create other computational artifacts.
    • LO 2.2.3 - Identify multiple levels of abstractions that are used when writing programs. [P3]
  • EU 2.3 - Models and simulations use abstraction to generate new understanding and knowledge.
    • LO 2.3.1 - Use models and simulations to represent phenomena. [P3]
    • LO 2.3.2 - Use models and simulations to formulate, refine, and test hypotheses. [P3]
Big Idea - Data
  • EU 3.1 - People use computer programs to process information to gain insight and knowledge.
    • LO 3.1.1 - Find patterns and test hypotheses about digitally processed information to gain insight and knowledge. [P4]
    • LO 3.1.2 - Collaborate when processing information to gain insight and knowledge. [P6]
  • EU 3.2 - Computing facilitates exploration and the discovery of connections in information.
    • LO 3.2.1 - Extract information from data to discover and explain connections or trends. [P1]
  • EU 3.3 - There are trade-offs when representing information as digital data.
    • LO 3.3.1 - Analyze how data representation, storage, security, and transmission of data involve computational manipulation of information. [P4]

Key Concepts

Students will understand that models are abstraction of real environments and will recognize the rationale for and limitations of modeling techniques to analyze problems.

Students will recognize the use of functional and data abstractions in modeling.

Students will be able to develop and test hypotheses using an experimental approach in a modeling framework.


Essential Questions

  • How can computing extend traditional forms of human expression and experience?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How can computational models and simulations help generate new understanding and knowledge?
  • How does abstraction make the development of computer programs possible?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

Modeling and Simulation 101 video ( https://www.youtube.com/watch?v=X-6zxImekOE )

Lesson Plan

Session One

Getting Started (8 min)

Introduce modeling and simulation using the first four minutes of the Modeling and Simulation 101 video ( https://www.youtube.com/watch?v=X-6zxImekOE ).  Students open a document for notes for today's session.

Students should record and briefly discuss these four statements about modeling and simulation:

  1. Models describe real-world activities using abstration, enabling testing of hypotheses at a fraction of the cost of actual experiments.
  2. Models can be expressed in computational, mathematical, textual, and/or graphical forms.
  3. Simulations are forms or instances of models that can be implemented as computer programs.
  4. Monte Carlo simulations exploit randomness to arrive at their results.

 

Learning NetLogo (40 min)

To start, all students should download netlogo from this link http://ccl.northwestern.edu/netlogo/.

Students should work through the NetLogo tutorial packet either in groups or as a class. There will be some "thought questions" throughout that students should discuss in their groups and as a class.

 

Wrapup (2 min)

Students should complete an exit ticket listing one interesting idea they learned, or one question they have about NetLogo or modeling.

 

Session Two

Getting Started (5 min)

Review yesterday's NetLogo lesson and ask the students to share what they learned, how NetLogo is similar to or different from Python, and any questions they have about how it works.

 

Models and Hypotheses (20 min)

Introduction (10 min)

  • Students start NetLogo and open the Art>Fireworks model.
  • Students use the interface Buttons for Setup and Go to run the simulation.
  • Have students read the information in the Info tab, and look through the code in the Code tab, to get a sense of what is being simulated and how it works.
  • Explain that the model is the description of the environment, while the simulation is the specific implementation of the model.
  • Think -Pair- Share: Ask the students to identify which aspects of the real-world environment (actual fireworks) are implemented in the model, and which aspects are not implemented.
  • Discuss with the class the fact that the simpler characteristics of the model or abstraction make the implementation of the model much easier, at the expense of a possible failure to represent key relationships.
  • Have the students examine the implementation (Code tab) and find the names of the five functions defined in the code.  Show where all 5 are called (three in the code and two in the Interface).
  • Discuss these facts about forming a hypothesis
    • A hypothesis is an educated guess about how things work.
    • A hypothesis is written like this: "If _____[I do] _____, then _____[this will result]_____
  • Explore hypotheses that could be tested by this model.  (Some hypotheses are suggested by the discussion in the Info tab -- e.g., "If gravity is set to 0, then ______."
  •  Ask:
    • What are two things that we can change through the interface?
    • What do we think will happen we we make those changes?

Activity (10 min)

Ask each student to write a hypothesis that can be tested with this simulation, share the hypothesis with elbow partners, and briefly experiment with the parameters to informally test the hypothesis.

 

Model Selection and Hypothesis Development (25 min)

Note: The "Hypothesis Testing Worksheet" which will be used for the next two lessons is available in the Lesson Resources Folder

For the rest of today's session and Session 3, students will work in teams of four students to select a model to experiment with, then divide into two partner sets to develop a hypothesis, devise an experimental plan, test the hypothesis, and write about their results.

Directions

  1. First divide the class into teams of four students, and have them spend 10 minutes exploring different models in NetLogo (which they should already have some familiarity with from Session 1 and the earlier part of Session 2). They should choose one model to focus on and write the name of the model in the corresponding part of the Hypothesis Testing worksheet, along with a short explanation of why they chose the model.
  2. For the next 10 minutes, they should study the parameters of the model and how it works, trying things out in the interface to see how changing the parameters affects behavior.
  3. In the final 10 minutes of the class session, split the teams into partner groups and have each partner group begin to develop hypotheses about the team's selected model.  You may wish to assign them to write these hypotheses down as a homework assignment, either together or individually, using the Hypothesis Testing worksheet to record their hypothesis, why they selected that hypothesis, and the experimental parameters they will use to test the hypothesis.

Session Three

Warmup (5 min)

Partners should revisit their hypotheses, and choose one hypothesis to focus on first.  (They can test both hypotheses if they have time.)  Each partner pair should write the name of their model and their selected hypothesis on the board, to share with the other students.

Experimental Design (10 min)

  1. Students should use the Hypothesis Testing worksheet to:
    1. Identify an experiment that will test their hypothesis.
    2. Select one or more parameters to vary.
    3. Choose what settings they will use for these parameters.
    4. Determine what measurements they will record.
    5. Decide how many trials they will run at each setting.  
    6. Note: Be sure that students have completed their experimental design before proceeding to perform the experiment -- many students will want to just jump in and start trying things, but one goal of the lesson is to help them understand that having a clear hypothesis and experimental design before collecting data is an important part of the scientific process.

Hypothesis Testing (30 min)

For the next twenty to thirty minutes, students should carry out their experiments and record the appropriate measurements.  

At the end of the section or for homework, students should write up their findings in a short report, showing the data they've collected (optionally in a graphical form, particularly if assigned as homework), discussing what the data says about their hypothesis, and concluding whether the hypothesis is supported or refuted by the simulation.

 

Wrapup (5 min)

Students should come back into their teams to share their findings, and discuss the advantages and disadvantages of using models and simulations to develop and test hypotheses.

 


Evidence of Learning

Formative Assessment

Students will share and post their hypothesis before testing and sharing the results. Teachers will verify that the hypothesis are falsifiable and testable by the simulations.


Summative Assessment

Students will select a model, develop a hypothesis, design an experiment, and use a simulation to test the hypothesis.

Lesson Summary

Pre-Lesson Preparation: Students need to have already chosen a topic and had it approved by the instructor. Students can use the following sources to help choose a data set:

http://www.data.gov/ , http://data.princeton.edu/wws509/datasets , http://www.statsci.org/datasets.html

Summary:  

This lesson is the summative assessment for Unit 4 on Data Analysis.    Students will select a data set and write a small Python program to analyze the data.  Students will then write a summary of their findings to demonstrate understanding of the data analysis process.  

Outcomes:

  • This unit assessment is designed to provide more practice in project based-work to prepare students for the final performance project at the end of this class.

Overview:

  1. Getting Started (5 min): Overview of task for the day.
  2. Independent Activity (40 min): Individually or in pairs, students collect and analyze data on their topic.
  3. Wrap Up (5 min): Overview of homework goals and expectations.
  4. Homework: Individual two-page summary about their findings.

Learning Objectives

CSP Objectives

Big Idea - Data
  • EU 3.1 - People use computer programs to process information to gain insight and knowledge.
    • LO 3.1.1 - Find patterns and test hypotheses about digitally processed information to gain insight and knowledge. [P4]
    • LO 3.1.2 - Collaborate when processing information to gain insight and knowledge. [P6]
  • EU 3.2 - Computing facilitates exploration and the discovery of connections in information.
    • LO 3.2.2 - . Determine how large data sets impact the use of computational processes to discover information and knowledge. [P3]
Big Idea - Programming
  • EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
    • LO 5.1.1 - Develop a program for creative expression, to satisfy personal curiosity, or to create new knowledge. [P2]
    • LO 5.1.2 - Develop a correct program to solve problems. [P2]

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP4: Model with mathematics.
  • MP5: Use appropriate tools strategically.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core Math:

  • S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable
  • S-ID.5-6: Summarize, represent, and interpret data on two categorical and quantitative variables
  • S-ID.7-9: Interpret linear models
  • S-IC.3-6: Make inferences and justify conclusions from sample surveys, experiments and observational studies

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • WHST 12.5 - Develop and strengthen writing as needed by planning, revising, editing, rewriting
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking

Key Concepts

Students will demonstrate their understanding of the process of collecting and evaluating data.


Essential Questions

  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How can computation be employed to facilitate exploration and discovery when working with data?
  • What opportunities do large data sets provide for solving problems and creating knowledge?
  • How are algorithms implemented and executed on computers and computational devices?
  • How are algorithms evaluated?

Teacher Resources

Student computer usage for this lesson is: required

Rubric provided on Google Drive - Rubric - Unit 4 Summative Assessment.htm in the lesson folder.

Lesson Plan

Getting Started (5 min)

Verify that every student has selected a topic (approved by the instructor in advance) and address what the goal is for today.

Independent Activity (40 min)

Students will either individually or in pairs (instructor's decision) create a small program that reads data from a file, analyzes it, creates a simple simulation and finally writes data to a file.  

 

Wrap Up (5 min)

Presentation about the expectations of the homework assignments.

 

Homework

Each student should create a 2-page typed summary that explains the following areas:

  • The chosen data 
  • Why the data topic was chosen
  • The analysis process
  • The results of the analysis process
  • The coding process used for data analysis

 

 


Options for Differentiated Instruction

Instructor has the option to have students work individually or in pairs for this assessment. 


Evidence of Learning

Formative Assessment

Review Rubric with class and clarify expectations.


Summative Assessment

Students will be assigned a unit project, with a topic of their choice, to demonstrate their understanding and mastery of the concepts of data collection and analysis.