Week 3 Summary (DSME5110F)
Presenting Quantitative (numeric) Variables
• Quantitative -> Qualitative (cut())
– Frequency distribution (table())
Copyright By PowCoder代写 加微信 powcoder
– Relative frequency distribution (prop.table()) – Bar plot (bar graph): barplot()
– Pie chart: pie()
• Histogram (hist())
Bivariate Relationships
• Cross Tabulations (table(), prop.table(), CrossTable() in the gmodels package)
– Simpson’s Paradox: unfair comparison with different percentages of games (different q1 and q2)
– pay attention to: labels in factor() • Scatter Plots:
– plot() and coplot() Measures of Central Tendency
• Mean (mean()) and median (median())
Measures of Location: Percentile and Quartile
• quantile() Boxplots
• boxplot()
• formula syntax: ~
Variance and Standard Deviation
• Variance: var()
• Standard Deviation: sd()
Useful functions
• tapply(one_variable, categorical, function) • summary()
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com