Probability 2

The ASTA team

Two random variables

Joint distribution of two discrete variables

\[ f(x,y) = P(X=x,Y=y).\]

Marginal distributions and independence

Joint distribution of two continuous variables

Marginal distributions and independence

\[f(x)=\int_{-\infty}^\infty f(x,y ) dy, \qquad g(y)=\int_{-\infty}^\infty f(x,y ) dx.\]

Covariance

Correlation

The binomial distribution

Probability function for binomial distribution, \(\binom{n}{x}\) is the binomial coefficient:

\[P(X=x) = \binom{n}{x}p^x(1-p)^{n-x}, \quad x=0,1,\ldots,n\]

Graph of probability functions for binomial distributions with \(n = 10\):

The normal distribution

Definition of the normal distribution

The normal distribution - interpretation of parameters

Normal \(z\)-scores

Probabilities in a normal distribution

Getting started with R

install.packages("mosaic")
library(mosaic)

Computing probabilities in a normal distribution

# For a standard normal distribution the probability of getting a value less than 1 is:
pdist("norm", q = 1, mean = 0, sd = 1)

## [1] 0.8413447

\[P(X>q) = 1-P(X\leq q) = 1-0.8413447 = 0.1586553.\]

Calculating \(z\)-values in the standard normal distribution

 qdist("norm", p = 0.005, mean = 0, sd = 1, xlim = c(-4, 4))

## [1] -2.575829
 qdist("norm", p = 1-0.005, mean = 0, sd = 1, xlim = c(-4, 4))

## [1] 2.575829

Sampling

Population and sample

Sampling principles

Statistical inference

Sample proportion

A real experiment

(The horizontal axis is on a log scale).

Sample mean

Central limit theorem

Illustration of CLT

Example: use of CLT

1 - pdist("norm", mean = 0, sd = 1, q = 2.7, xlim = c(-4, 4)) 

## [1] 0.003466974

Sample variance and standard deviation

\(z\)-scores for the sample mean

\(t\)-distribution and \(t\)-score

The expression of the density function is of slightly complicated form and will not be stated here, instead the \(t\)-distribution is plotted below for \(df =1,2,10\) and \(\infty\).