計算機語言 ( 大一, 第二学期 ) 福島康裕 助理教授, 環境系統工程研究室 ext
Frequency table and Histogram Frequency table Separate measured values into several “classes”, and count the number of measured values that belong to that class Class value Relative frequency frequency=10 means different for group of 100 and 1000 Histogram … see the next slide class value = (minimum + maximum) / 2 relative frequency = frequency / entire quantity
Example: Frequency Table minmaxclass value frequencyrelative frequency /60=1.7% /60=3.3% /60=43.3% /60=41.7% /60=10.0%
Example: Histograms Q: number of classes = 5 … is this appropriate?
Example: Histograms
Guideline for number of classes Sturges’s formula number of classes = 1 + log 2 n ex) for n=60, number of classes = 7 or 8… Usually, we use equal range for classes Useful !!
Variance and Standard Deviation S 2 : Variance ( 分散 ) Deviation=measurement – mean Deviation can be both + and - sum of deviation will be 0 ! calculate variance with below formula S: Standard Deviation ( 標準偏差 )
Scatter gram Two dimensional data (x i, y i ) in statistics, we see how the scatter is close to a line
Covariance (S xy ) and Correlation Coefficient (r xy )
Correlation Usually, we measure how much two numbers are correlated by r xy r=1 :positive perfect correlation 0<r<1 :positive correlation -1<r<0 :negative correlation r=-1 : negative perfect correlation If | r | is larger, correlation is stronger !!
Summary How much are they scattered? Variation S 2 Standard deviation S Covariance S xy Correlation Coefficient r xy Histogram, Scattergram class value, frequency, relative frequency Sturges’s formula Frequency table