Descriptive Statistic

Large N & Leeuwenhoek (70700173)

Yue Hu

Overview

  • Data
  • Variable
    • Typology
    • Point
    • Dispersion
  • Description
    • Point
    • Dispersion

1 Data

1.1 Concept

Common definition:

The quantities, characters, or symbols on which operations are performed by a computer, being stored and transmitted in the form of electrical signals and recorded on magnetic, optical, or mechanical recording media.

Oxford Language:

Things known or assumed as facts, making the basis of reasoning or calculation.

1.2 Think deeper

  • Is data a product?
  • Is data the “new oil”?
  • Is noise data?

If you can’t measure it, you can’t manage it

If you don’t understand it,
you can’t well measure it.

2 Variable

2.1 Definition

Specifically, a variable = a dimension(well…) = a column

Empirically, a variable = a piece of data with homogeneous properties

Relationally, an observation ⊂ {var1, var2, var3,…} ⊂ a dataset

2.2 Quiz

A concept?
A variable?
A measurement?

2.3 Typology

  • Constant vs. variables
  • Dependent/outcome/response ~
  • Independent/explanatory/treatment ~

When would you want a variable to be constant in a research?

Nominal/categorical (discrete) < Ordinal (discrete) < Numeric(continuous)

  • Interval: Meaningful distance
    • Discrete/continuous
    • Zero is a terminal
    • Meaningful addition/subtraction
  • Ratio: Interval with meaningful zero
    • Continuous
    • Zero means absence
    • Meaningful multiplication/division

2.4 Interval vs. Ratio

2.5 Summary

Data

  • Fact(-ish)…
  • Product…
  • Foundation…

Variable

  • Definition: a dim…
  • Terminology:
    • Y: …
    • X: …
  • Typology
    • Discrete…
    • Continuous…

3 Description

3.1 Level of description

Raw data

Time series plots, scatter plots

Histogram

Frequency distribution (i, n. = ∑ni, n.. = ∑nij)

Point estimations/Moments

3.2 Moment: Point

  • Mode: most frequent occurring number, not good of central tendency, bimodal (two modes)
  • Median: at 50%
    • Odd: middle value
    • Even: mean of two mid values
    • Sensitive for outliers
  • Mean: \(\bar{X}\rightarrow\mu.\)
    • Group: \(\bar{X} = 1/n\sum xf.\), x is the cell midpoint and f is the frequency of \(X_i\)

Note

  • For symmetric distributions, median and mean are identical
  • Point → “common,” “usual,”“average”

3.3 Think deeper

I rated the applicant among the top 10-15% students taking BSc-courses at Manchester; and now I know for sure that she is among the best…

What’s the relationship between percentile and mean?

3.4 When to use what

Hint

What’s the “point” estimate for?

3.5 How to measure it

3.6 Moment: Dispersion

Range: Max - min; [min, max]

Q: What’s the range of 2, 2, 2, 2?

  • Interquartile Range (IQR): [25% quartile, 75% quartile]
  • Mean absolute deviation (MAD): \(1/n\sum|X - \bar{X}|.\)
  • Mean square deviation (MSD): \(1/n\sum(X - \bar{X})^2.\)

Dispersion means how wild one can be

Variance: σ2 for the population;1 s2 for a sample2

\[\begin{align} \sigma^2 =& \sum(X - \mu)^2p(X);\\ s^2 =& \sum(X - \bar X)^2p(x), \\ =& \frac{\sum(X - \bar{X})^2}{n - 1}. \end{align}\]

Why n - 1?

3.7 Why n - 1

Intuitively, Only when there are more than one items, the variance can exist.

In statistics, degree of freedom (d.f.)*1

\[\begin{equation} \begin{bmatrix} X_1\\ \vdots \\ X_n \end{bmatrix} = \bar{X} \begin{bmatrix} 1 \\\vdots \\ 1 \end{bmatrix} + \begin{bmatrix} X_1 - \bar{X} \\ \vdots \\ X_n - \bar{X} \end{bmatrix} \end{equation}\]

3.8 Two Formats of Variance

Definition:

\[\begin{align} \sigma^2 =& \sum(X - \mu)^2p(X);\\ s^2 =& \sum(X - \bar X)^2p(x), \\ =& \frac{\sum(X - \bar{X})^2}{n - 1}. \end{align}\]

Given μ = ∑Xp(x), ∑p(x) = 1,

\[\begin{aligned} \sigma^2 =& \sum(X - \mu)^2p(x),\\ =& \sum(X^2 -2X\mu + \mu^2)p(x),\\ =& \sum X^2p(x) - 2\mu\sum Xp(x) + \mu^2\sum p(x). \\ =& \sum X^2p(x) - \mu^2. \end{aligned}\]

3.9 Standard deviation (SD)

  • Population: \(\sigma = \sqrt{\sum(X - \mu)^2p(X)}\);
  • Sample: \(s = \sqrt{\frac{\sum(X - \bar{X})^2}{n - 1}}\);
  • Ratio: \(\sigma = \sqrt{\pi(1 - \pi)}\);
  • Group: \(\sqrt{\frac{f}{n}\sum(X - \bar{X})^2}\).

3.10 Take-home point

4 R Lab

4.1 Learning R with Dr. Hu

Starting from math💀

4.2 Hey, no fear

Launch (the Rstudio)!