Dry Run Fix it Write a program

Slides:



Advertisements
Similar presentations
STUDENTS WILL DEMONSTRATE UNDERSTANDING OF THE CALCULATION OF STANDARD DEVIATION AND CONSTRUCTION OF A BELL CURVE Standard Deviation & The Bell Curve.
Advertisements

The standard error of the sample mean and confidence intervals
Variability Measures of spread of scores range: highest - lowest standard deviation: average difference from mean variance: average squared difference.
The standard error of the sample mean and confidence intervals How far is the average sample mean from the population mean? In what interval around mu.
Objectives The student will be able to: find the variance of a data set. find the standard deviation of a data set. SOL: A
Quiz 2 Measures of central tendency Measures of variability.
 Review homework Problems: Chapter 5 - 2, 8, 18, 19 and control chart handout  Process capability  Other variable control charts  Week 11 Assignment.
Measures of Variability James H. Steiger. Overview Discuss Common Measures of Variability Range Semi-Interquartile Range Variance Standard Deviation Derive.
Chapter 3 Basic Statistics Section 2.2: Measures of Variability.
 The data set below gives the points per game averages for the 10 players who had the highest averages (minimum 70 games or 1400 points) during the
SECTION 12-3 Measures of Dispersion Slide
Psychology’s Statistics. Statistics Are a means to make data more meaningful Provide a method of organizing information so that it can be understood.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Averages and Variation.
Lesson Objective Understand what we mean by a Random Variable in maths Understand what is meant by the expectation and variance of a random variable Be.
Statistics Describing, Exploring and Comparing Data
Welcome to MM570 Applies Statistics for Psychology Unit 2 Seminar Dr. Bob Lockwood.
Objectives The student will be able to:
Standard Deviation A Measure of Variation in a set of Data.
How do you do the following? Find the number of scores within 3 points of the average of 10 scores? What kind of a tool do you need? Today’s notes: Include.
Standard Deviation. Two classes took a recent quiz. There were 10 students in each class, and each class had an average score of 81.5.
Aron, Aron, & Coups, Statistics for the Behavioral and Social Sciences: A Brief Course (3e), © 2005 Prentice Hall Chapter 2 The Mean, Variance, Standard.
Computer Science 1 How do you store a bunch of similar stuff?
Computer Science I: Understand how to evaluate expressions with DIV and MOD Random Numbers Reading random code Writing random code Odds/evens/…
int [] scores = new int [10];
Chapter 1 Lesson 7 Variance and Standard Deviation.
Normal Distribution Students will be able to: find the variance of a data set. find the standard deviation of a data set. use normal distribution curve.
Chapter 2 The Mean, Variance, Standard Deviation, and Z Scores.
 2012 Pearson Education, Inc. Slide Chapter 12 Statistics.
Descriptive Statistics ( )
Measures of Central Tendency
Different Types of Data
Objectives The student will be able to:
Objectives The student will be able to:
6.2 Difference of 2 Squares Goal: To be able to recognize and completely factor the difference of two squares Remember to factor out a common factor before.
Chapter 12 Statistics 2012 Pearson Education, Inc.
12.3 Analyzing Data 12.4 Standard Deviation.
Summary descriptive statistics: means and standard deviations:
Chapter 2 The Mean, Variance, Standard Deviation, and Z Scores
Chapter 8 Arrays Objectives
Objectives The student will be able to:
int [] scores = new int [10];
Learning Targets I can: find the variance of a data set.
Summary descriptive statistics: means and standard deviations:
Dry run Fix Random Numbers
Topics discussed in this section:
What does the following mean?
Pair work – Do you want to change seats??
Computer Science 2 Tally Arrays 2/4/2016.
What do you do when you don’t know how to get started.
See requirements for practice program on next slide.
Chapter 8 Arrays Objectives
AP Java 9/21/2018.
Exploring Computer Science Lesson 4-12
Computer Science II Second With files.
Computer Science 2 More Trees.
Pair work – Do you want to change seats??
Objectives The student will be able to:
Computer Science 1 For..do loop Dry Run Take notes on the For loop
ArrayList Day 3 Be able to read AP Mult Choice questions tied to ArrayLists Be able to write a program that uses ArrayLists that analyzes numbers.
Computer Science I: Get out your notes.
Chapter 12 Statistics.
Objectives The student will be able to:
Warm Up – 5/15 - Thursday Consider the following test scores: Answer the following in complete sentences: A) Who is the best student? B) How do you know?
Random Numbers while loop
Dry Run Fix it Write a program
WJEC GCSE Computer Science
Lecture 4 Psyc 300A.
Calculating Standard Deviation
The Mean Variance Standard Deviation and Z-Scores
Presentation transcript:

Dry Run Fix it Write a program Computer Science 1 Dry Run Fix it Write a program

Learning Objectives Students will be able to read a program that incorporates arrays. Students will be able to write code to declare, input, output and compare values in an array. Students will be able to fix a program that uses arrays. Students will be able to write a program that uses arrays.

Dry Run for pos:= 1 to 5 do info[pos]:= pos*2; for pos := 1 to 5 do begin if (pos div 2) > 2 then info[pos]:= info[pos] + pos else info[pos]:= info[pos]*pos; end; writeln(info[pos]);

Fix it On the Web page there is a program called fixary1.pas It is supposed to input 10 scores, calculate the average of these score and the show all of the scores that are below average. See if you can fix it!!

Array Program 1 Input: 10 scores (integers) Output: The high score The low score The average The number of scores within 3 of the average Push: Show the numbers in order low to high Input: 9 scores and calculate the sample standard deviation Array Program 1 The standard deviation is a measure of central tendency. It will describe how much variation exists from the average. A low standard deviation means that the numbers tend to be close to the average. Accommodations: Provide notes accessible at school and at home for this lesson. Include scaffolding activities to check for understanding during the lesson Have Java language available for students to complete activities and explore applying the ideas at home. Provide extended time to complete the assignment. Modifications: Students can complete either of the assignments for full credit Add an option for simple input to/output from the array. Input 10 names and output the names in reverse order. Model rolling a pair of dice 100 times and save the rolls in an array. Then show the rolls from the array. Students dry run a program, drawing a picture of the array and demonstrating how the values change while the program is running.

Standard Deviation Example. Find the standard deviation of 4, 9, 11, 12, 17, 5, 8, 12, 14 First work out the mean (Average, xbar,…): (4 + 9 + 11 + 12 + 17 + 5 + 8 + 12 + 14)/9 = 10.222 Now, subtract the mean individually from each of the numbers in the question and square the result. This is equivalent to the (x - xbar)² step. x refers to the values in the question. x               4        9        11       12       17       5       8       12      14 (x - xbar)²     38.7   1.49    0.60    3.16    45.9   27.3   4.94   3.16   14.3 Now add up these results (this is the ‘uppercase sigma' in the formula): 139.55 Divide by n-1. n is the number of values, so in this case n-1 is 8: 139.55 / 8 = 17.44 And finally, square root this: 4.18