Descriptive Statistics I: By the end of this class you should be able to: Palm: Section 7.1, 7.2 Program cords and delays in your music programs plot a.

Slides:



Advertisements
Similar presentations
Introduction to Engineering MATLAB – 11 Plotting - 4 Agenda Multiple curves Multiple plot.
Advertisements

Introduction to Matlab
Empirical Model Building I: Objectives: By the end of this class you should be able to: find the equation of the “best fit” line for a linear model explain.
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Unit 1.1 Investigating Data 1. Frequency and Histograms CCSS: S.ID.1 Represent data with plots on the real number line (dot plots, histograms, and box.
Analyzing Data (C2-5 BVD) C2-4: Categorical and Quantitative Data.
1.3 ARRAYS, FILES, AND PLOTS + FOURIER SERIES BY MR. Q.
Introduction to Summary Statistics
Statistical Analysis with Excel
Copyright (c) Bani Mallick1 Lecture 2 Stat 651. Copyright (c) Bani Mallick2 Topics in Lecture #2 Population and sample parameters More on populations.
Describing data with graphics and numbers. Types of Data Categorical Variables –also known as class variables, nominal variables Quantitative Variables.
B a c kn e x t h o m e Classification of Variables Discrete Numerical Variable A variable that produces a response that comes from a counting process.
Learning Objectives for Section 11.3 Measures of Dispersion
1 Summary Statistics Excel Tutorial Using Excel to calculate descriptive statistics Prepared for SSAC by *David McAvity – The Evergreen State College*
AP Biology Intro to Statistic
Summarizing Scores With Measures of Central Tendency
Describing distributions with numbers
Objective To understand measures of central tendency and use them to analyze data.
Descriptive Statistics Used to describe the basic features of the data in any quantitative study. Both graphical displays and descriptive summary statistics.
APPENDIX B Data Preparation and Univariate Statistics How are computer used in data collection and analysis? How are collected data prepared for statistical.
Statistical Analysis with Excel (PREVIEW). Spreadsheet Programs First developed in 70s –VisiCalc Dan Bricklin and Bob Frankston –Operated on Apple II.
Statistics Chapter 9. Statistics Statistics, the collection, tabulation, analysis, interpretation, and presentation of numerical data, provide a viable.
Descriptive Statistics II: By the end of this class you should be able to: describe the meaning of and calculate the mean and standard deviation of a sample.
Chapter 3 Basic Statistics Section 2.2: Measures of Variability.
Tuesday August 27, 2013 Distributions: Measures of Central Tendency & Variability.
8.3 Measures of Dispersion  In this section, you will study measures of variability of data. In addition to being able to find measures of central tendency.
Are You Smarter Than a 5 th Grader?. 1,000,000 5th Grade Topic 15th Grade Topic 24th Grade Topic 34th Grade Topic 43rd Grade Topic 53rd Grade Topic 62nd.
M07-Numerical Summaries 1 1  Department of ISM, University of Alabama, Lesson Objectives  Learn when each measure of a “typical value” is appropriate.
MATH IN THE FORM OF STATISTICS IS VERY COMMON IN AP BIOLOGY YOU WILL NEED TO BE ABLE TO CALCULATE USING THE FORMULA OR INTERPRET THE MEANING OF THE RESULTS.
Dot Plots and Histograms Lesson After completing this lesson, you will be able to say: I can create a dot plot and histogram to display a set of.
The Central Tendency is the center of the distribution of a data set. You can think of this value as where the middle of a distribution lies. Measure.
Structured Programming: Debugging and Practice by the end of this class you should be able to: debug a program using echo printing debug a program using.
Descriptive Statistics: Presenting and Describing Data.
1 Descriptive Statistics 2-1 Overview 2-2 Summarizing Data with Frequency Tables 2-3 Pictures of Data 2-4 Measures of Center 2-5 Measures of Variation.
QM Spring 2002 Statistics for Decision Making Excel for Statistics: An Overview.
Chapter SixteenChapter Sixteen. Figure 16.1 Relationship of Frequency Distribution, Hypothesis Testing and Cross-Tabulation to the Previous Chapters and.
Files: By the end of this class you should be able to: Prepare for EXAM 1. create an ASCII file describe the nature of an ASCII text Use and describe string.
1-d Arrays & Plotting.
Lean Six Sigma: Process Improvement Tools and Techniques Donna C. Summers © 2011 Pearson Higher Education, Upper Saddle River, NJ All Rights Reserved.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Chapter 11 Data Descriptions and Probability Distributions Section 3 Measures of Dispersion.
Chapter 6: Random Errors in Chemical Analysis. 6A The nature of random errors Random, or indeterminate, errors can never be totally eliminated and are.
Statistical Analysis with Excel © 2012 Project Lead The Way, Inc.Introduction to Engineering Design.
Cell Diameters and Normal Distribution. Frequency Distributions a frequency distribution is an arrangement of the values that one or more variables take.
Descriptive Statistics
Chapter 1.1 Displaying Distributions with graphs.
INTRODUCTION TO STATISTICS
Analysis of Quantitative Data
Statistical Methods Michael J. Watts
Analysis and Empirical Results
AP Biology Intro to Statistics
Statistical Methods Michael J. Watts
Introduction to Summary Statistics
Summarizing Scores With Measures of Central Tendency
Introduction to Summary Statistics
Introduction to Summary Statistics
IB Psychology Today’s Agenda: Turn in:
Description of Data (Summary and Variability measures)
Introduction to Summary Statistics
Math 8C Unit 6 – Statistics & Probability
Introduction to Summary Statistics
Introduction to Summary Statistics
AP Biology Intro to Statistic
Introduction to Summary Statistics
AP Biology Intro to Statistic
AP Biology Intro to Statistic
Introduction to Summary Statistics
Introduction to Summary Statistics
Introduction to Summary Statistics
Data Literacy Graphing and Statisitics
Presentation transcript:

Descriptive Statistics I: By the end of this class you should be able to: Palm: Section 7.1, 7.2 Program cords and delays in your music programs plot a histogram of absolute frequencies and describe its nature vary the number of bins in a histogram and choose an appropriate number plot a histogram of relative frequencies and explain why it is needed.

Practice Problem (groups of 3): A debugging a Sine Series Function The sin function can be approximated by the series: Download the function: SinSeries1.m from the website This function was developed to estimate the sine using the above series given the x-value and n, the number of terms to be used in the sequence. Follow the instructions on the worksheet handout.

Problem Goal (brief): Develop a function that will estimate the sine for a given number of terms in the sine series Inputs: NameDescriptionUnits or ValuesInput Source * xThe number to take the sine ofRadiansCommand line nThe number of terms in the seriesIntegerCommand line Outputs: NameDescriptionUnits or ValuesOutput type * SResulting sinUnitlessCommand line Test Case: for x =0.5, n = 3 sin(0.5) = (0.5) – (0.5) 3 /6 + (0.5) 5 /120 = 0.5 – = Versus the exact value for sin sin(0.5) =

Flowchart for Sine Series Problem

Working with Chords download “chordplay.m” from the “Music in MATLAB’ page Open this script in the MATLAB editor. Exercise instructions and questions are in the comments of this script. Please write down answers to these questions. To “uncomment” remove the “%” from the beginning of a line Exercises 1: Play a major chord 1.What are the names for these three notes? 2.What advantage can you see to calculating them this way instead of just typing in the frequencies? 3.How are the three note series combined into one series/chord. Exercise 2: Add a delay 4.How is the delay created? 5.Why is the pad added at the end of the first note twice? 6.What are the dimensions of the chord array? Exercise 3: Play two notes in stereo 7. What are the dimensions of the chord array now?

Saving and Loading.wav files Loading.wav files: >> [series, sf, bits] = wavread(‘wavfile’) Saving a.wav: >> wavwrite (series, sf, bits, ‘filename’) Import Wizard: File  Import Data

Characteristics of a stored ware Series: The list of y- values for the wave. Sampling Frequency: how many times per second you have a data point = 1/(interval between points) Bits: The number of significant figures used in the y-values (in binary) 8 bits = 256 levels 16 bits = 65,536 levels 24 bits = 16 x 10 6 levels

Descriptive Statistics please download cordbreak1.mat & load into MATLAB Palm: Section 7.1, 7.2

Plot of Cordbreak data download cordbreak from web page Load into MATLAB >> load cordbreak Plot the data: >> plot(cord,’p’) 60 tests of the force required to break a cord shows variation, like most real data (it is stochastic) how can we show this variability?

Histogram: a frequency plot >> hist(cord) >> xlabel 'breaking force (N)' >> ylabel 'absolute frequency '

breaking strength bins Number of occurrences in a bin The x- range is divided into a series of bins – small ranges – the number of occurrences in each bin is then counted.

Some things to notice: a graph of how something varies  descriptive most data has a central tendency and then drops off toward the edges. the chosen bins are very important. By default MatLAB chooses 10 bins. this is a plot of absolute frequency = the actual number of observations in each bin this histogram is dependent on the total sample size. As the sample size gets larger, the height of the bars will increase.

Histogram Bins Bins can greatly effect the look of a histogram By default MATLAB uses 10 bins Adjusting bins in MATLAB: >> hist(cord, n) where n is the number of bins desired Exercise: Create a figure with four plots arranged 2x2 where the plots are histograms of the cordbreak data with bin numbers of 10, 20, 5 and 7.

>> subplot(2,2,1) >> hist(cord) >> xlabel 'breaking force (N)' >> ylabel 'absolute frequency' >> title 'ten bins‘ >> subplot(2,2,2) >> hist(cord,20) >> title 'twenty bins‘ >> subplot(2,2,3) >> hist(cord,5) >> title 'five bins‘ >> subplot(2,2,4) >> hist(cord,7) >> title 'seven bins'

Histogram Commands >> hist (data)  histogram with 10 equal width bins >> hist(data, number of bins)  histogram with specified number of bins >> [z, x] = hist(data)  no histogram produced  outputs a vector of heights (z) and the center point of each bin (x) try using this command. Then try >> bar(x, z) >> hist(data, vector of bin centers)  bins are centered at the provided values

Relative Frequency Histogram Try this: >> [z,x]=hist(cord); >> zr=z/sum(z) >> bar(x,zr) add axis labels etc. Frequency is relative to the total number of samples (N). Each bar is the fraction of samples in that bin This histogram is independent of total sample size

The resulting relative frequency histogram

How can we quantify central tendency? Mean (average) Quantifying Central Tendency & Variability (ask class)

How can we quantify spread? difference from mean  results in vector of deviations data – mean sum the differences  gives one number but effected by sample sz.  (data – mean) normalize by sample size (minus one)  independent of sample sz.  (data – mean)/(n-1) take square root Standard Deviation:

FormulaMATLABEXCEL Mean >> mean(variable)= average(range) Sample Standard Deviation >> std(variable)= stdev(range)