CS1512 Foundations of Computing Science 2 Lecture 20 Probability and statistics (2) www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/ © J R W Hunter,

Slides:



Advertisements
Similar presentations
1 Radio Maria World. 2 Postazioni Transmitter locations.
Advertisements

Números.
1 A B C
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
AGVISE Laboratories %Zone or Grid Samples – Northwood laboratory
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
/ /17 32/ / /
AP STUDY SESSION 2.
Reflection nurulquran.com.
1
EuroCondens SGB E.
Worksheets.
& dding ubtracting ractions.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Addition and Subtraction Equations
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Multiplication X 1 1 x 1 = 1 2 x 1 = 2 3 x 1 = 3 4 x 1 = 4 5 x 1 = 5 6 x 1 = 6 7 x 1 = 7 8 x 1 = 8 9 x 1 = 9 10 x 1 = x 1 = x 1 = 12 X 2 1.
Division ÷ 1 1 ÷ 1 = 1 2 ÷ 1 = 2 3 ÷ 1 = 3 4 ÷ 1 = 4 5 ÷ 1 = 5 6 ÷ 1 = 6 7 ÷ 1 = 7 8 ÷ 1 = 8 9 ÷ 1 = 9 10 ÷ 1 = ÷ 1 = ÷ 1 = 12 ÷ 2 2 ÷ 2 =
David Burdett May 11, 2004 Package Binding for WS CDL.
1 When you see… Find the zeros You think…. 2 To find the zeros...
Describing Data: Measures of Dispersion
4-4 Variability Objective: Learn to find measures of variability.
We need a common denominator to add these fractions.
CALENDAR.
Summative Math Test Algebra (28%) Geometry (29%)
Lecture 7 THE NORMAL AND STANDARD NORMAL DISTRIBUTIONS
CS CS1512 Foundations of Computing Science 2 (Theoretical part) Kees van Deemter Probability and statistics Propositional Logic Elementary set theory.
The 5S numbers game..
突破信息检索壁垒 -SciFinder Scholar 介绍
St. Edward’s University
Break Time Remaining 10:00.
The basics for simulations
Division- the bus stop method
PP Test Review Sections 6-1 to 6-6
MM4A6c: Apply the law of sines and the law of cosines.
Frequency Tables and Stem-and-Leaf Plots 1-3
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Progressive Aerobic Cardiovascular Endurance Run
Introduction Our daily lives often involve a great deal of data, or numbers in context. It is important to understand how data is found, what it means,
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
Quantitative Analysis (Statistics Week 8)
Adding Up In Chunks.
CS CS1512 Foundations of Computing Science 2 Week 2 (CSD week 31) Probability and statistics (2) © J R W Hunter, 2006, C J van Deemter 2007.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
When you see… Find the zeros You think….
CS CS2013 Mathematics for Computing Science Kees van Deemter Probability and statistics © J R W Hunter, 2006; C J van Deemter 2007.
CS CS1512 Foundations of Computing Science 2 Lecture 24 Probability and statistics (5) Random.
Before Between After.
Subtraction: Adding UP
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Static Equilibrium; Elasticity and Fracture
Essential Cell Biology
12-2 Conditional Probability Obj: To be able to find conditional probabilities and use formulas and tree diagrams.
Converting a Fraction to %
Resistência dos Materiais, 5ª ed.
Clock will move after 1 minute
PSSA Preparation.
& dding ubtracting ractions.
Chapter 2 Tutorial 2nd & 3rd LAB.
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
1 Dr. Scott Schaefer Least Squares Curves, Rational Representations, Splines and Continuity.
Schutzvermerk nach DIN 34 beachten 05/04/15 Seite 1 Training EPAM and CANopen Basic Solution: Password * * Level 1 Level 2 * Level 3 Password2 IP-Adr.
Presentation transcript:

CS1512 Foundations of Computing Science 2 Lecture 20 Probability and statistics (2) www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/ © J R W Hunter, 2006

Ordinal data a1 ≤ a2 ≤ a3 ≤ ... ≤ ak ≤ ... ≤ aK X is an ordinal variable with values: a1, a2, a3, ... ak, ... aK ‘ordinal’ means that: a1 ≤ a2 ≤ a3 ≤ ... ≤ ak ≤ ... ≤ aK cumulative frequency at level k: ck = sum of frequencies of values less than or equal to ak ck = f1 + f2 + f3 + ... + fk = (f1 + f2 + f3 + ... + fk-1 ) + fk = ck-1 + fk also (%) cumulative relative frequency www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

CAS marks % relative frequencies % cumulative relative frequencies www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Enzyme concentrations Concentration Freq. Rel.Freq. % Cum. Rel. Freq. 19.5 ≤ c < 39.5 1 0.033 3.3% 39.5 ≤ c < 59.5 2 0.067 10.0% 59.5 ≤ c < 79.5 7 0.233 33.3% 79.5 ≤ c < 99.5 7 0.233 56.6% 99.5 ≤ c < 119.5 7 0.233 79.9% 119.5 ≤ c < 139.5 3 0.100 89.9% 139.5 ≤ c < 159.5 2 0.067 96.6% 159.5 ≤ c < 179.5 0 0.000 96.6% 179.5 ≤ c < 199.5 0 0.000 96.6% 199.5 ≤ c < 219.5 1 0.033 100.0% Totals 30 1.000 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Cumulative histogram www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Discrete two variable data www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Continuous two variable data X Y 4.37 24.19 8.10 39.57 11.45 55.53 10.40 51.16 3.89 20.66 11.30 51.04 11.00 49.89 6.74 35.50 5.41 31.53 13.97 65.51 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Time Series Time and space are fundamental (especially time) Time series: variation of a particular variable with time www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Summarising data by numerical means Further summarisation (beyond frequencies) Measures of location (Where is the middle?) Mean Median Mode www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Mean = n _ sum of observed values of X Sample Mean (X) = number of observed values  x = n use only for quantitative data www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Sigma  xi = x1 + x2 + ... + xi + ... + xn-1 + xn Sum of n observations n  xi = x1 + x2 + ... + xi + ... + xn-1 + xn i = 1 If it is clear that the sum is from 1 to n then:  x = x1 + x2 + ... + xi + ... + xn-1 + xn Sum of squares  x2 = x12 + x22 + ... + xi2 + ... + xn-12 + xn2 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

 x from frequencies If X is a categorical variable with values: a1, a2, a3, ... ak, ... aK  x = x1 + x2 + ... + xi + ... + xn-1 + xn (order of summation isn’t important) (e.g. piglets: 5 + 11 + 12 + 7 + + 8 + 14 + 7 + ... + 14 + ...) Group together those x’s which have value a1, those with value a2, ...  x = x.. + x.. + x.. ... + x’s which have value a1 - there are f1 of them x.. + x.. ... + x’s which have value a2 - there are f2 of them ... x.. + x.. x’s which have value aK - there are fK of them = f1 * a1 + f2 * a2 + ... + fk * ak + ... + fK * aK K =  fk * ak k = 1 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Mean Litter size Frequency Cum. Freq ak fk 5 1 1 6 0 1 7 2 3 8 3 6 9 3 9 10 9 18 11 8 26 12 5 31 13 3 34 14 2 36 Total 36 K x =  fk * ak k = 1 = 1*5 + 0* 6 + 2*7 + 3*8 3*9 + 9*10 + 8*11 5*12 + 3*13 + 2*14 = 375 _ X = 375 / 36 = 10.42 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Median Sample median of X = middle value when n sample observations are ranked in increasing order = the ((n + 1)/2)th value n odd: values: 183, 163, 152, 157 and 157 rank order: 152, 157, 157, 163, 183 median: 157 n even: values: 165, 173, 180, 164 rank order: 164, 165, 173, 180 median: (165 + 173)/2 = 169 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Median Median = 10.5 Litter size Frequency Cum. Freq 5 1 1 6 0 1 7 2 3 5 1 1 6 0 1 7 2 3 8 3 6 9 3 9 10 9 18 11 8 26 12 5 31 13 3 34 14 2 36 Total 36 Median = 10.5 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Median from cumulative distribution cumulative % frequency polygon www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Mode Sample mode = value with highest frequency (may not be unique) Litter size Frequency Cum. Freq 5 1 1 6 0 1 7 2 3 8 3 6 9 3 9 10 9 18 11 8 26 12 5 31 13 3 34 14 2 36 Mode = 10 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Skew left skewed symmetric right skewed mean < mode mean  mode mean > mode www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Variance Measure of spread: variance www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Variance sample variance = s2 sample standard deviation = s = √ variance www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Variance and standard deviation K x2 =  fk * ak2 k = 1 = 1*25 + 2*49 + 3*64 3*81 + 9*100 + 8*121 5*144 + 3*169 + 2*196 = 4145 x = 375 (x)2 / n = 375*375 / 36 = 3906 s2 = (4145-3906) / (36-1) = 6.83 s = 2.6 Litter size Frequency Cum. Freq ak fk 5 1 1 6 0 1 7 2 3 8 3 6 9 3 9 10 9 18 11 8 26 12 5 31 13 3 34 14 2 36 Total 36 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Piglets Mean = 10.42 Median = 10.5 Mode = 10 Std. devn. = 2.6 www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Quartiles and Range Lower quartile: value such that 25% of observations are below it (Q1). Median: value such that 50% of observations are below (above) it (Q2). Upper quartile: value such that 25% of observations are above it (Q3). Range: the minimum (m) and maximum (M) observations. Box and Whisker plot: m Q1 Q2 Q3 M www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Estimating quartiles www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Linear Regression y y = mc + c x Calculate m and c so that (distance of point from line)2 is minimised y y = mc + c x www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/

Time Series - Moving Average Time Y 3 point MA 0 24 * 1 18 23.0000 2 27 22.3333 3 22 25.6667 4 28 28.0000 5 34 31.0000 6 31 36.6667 7 45 38.0000 8 38 39.3333 9 35 * smoothing function can compute median, max, min, std. devn, etc. in window www.csd.abdn.ac.uk/~jhunter/teaching/CS1512/lectures/