Statistics

Statistics

variance and standard deviation = dispersion (集中 or 分散)

expected value = 長期平均獲利

covariance = two variables have same changes or not

Example One

Example Two

-10, 0, 10, 20, 30

8, 9, 10, 11, 12

mean (average)

(-10 + 0 + 10 + 20 + 30) / 5 = 10

(8 + 9 + 10 + 11 + 12) / 5 =10

variance

200

2

standard deviation

141

1.41

Expected value

  1. the long-run average value of the same experiment

  2. Whole population mean

E(x) = sum(probability * x_value)

打擊率0.35的選手打100球, 期望打到35球

Convairance

  1. stock A & stock B move at the same direction -> positive covariance

  2. stock A & stock B move at the opposite direction -> negative covariance

  3. Covariance =(1) how far the variables are spread out (2) the nature of their relationship

  4. degree to which two variables are linearly associated.

  5. Two are independent will have covariance = 0

Correlation is a scaled version of covariance that takes on values in [−1,1]

Binomial / Bernoulli / Poisson

Binomial Distribution

  1. discrete probability distribution.

  2. Outcome is True or False. (Dice shows 4, or not 4)

Bernoulli distribution

  1. two possible outcome

  2. For a single trial, i.e., n = 1, the binomial distribution is a Bernoulli distribution.

Poisson process

  1. we know the average time between events but they are randomly spaced (stochastic)

  2. Earthquake happens every 5 years in A-zone, but we don't know when is next.

  3. the binomial distribution with large trials(continuous) and rare happens = poisson

lambda = expected number of events in the interval

Meteor example

Waiting time

the probability of waiting less than or equal to a time:

wait for 6mins, you will have 39% chance to see a meteor.

1 - math.exp((1/12)*6) = 39%

https://towardsdatascience.com/the-poisson-distribution-and-poisson-process-explained-4e2cb17d459

Last updated

Was this helpful?