0 views

Uploaded by gopi

Review of Mathematical Concepts for Data Scientists

Review of Mathematical Concepts for Data Scientists

© All Rights Reserved

- !Business Statistics
- Probability for Finance
- Statistics and probabilities
- Dip Image Enhance
- Random Variables
- Statistics- Random Variables Working With Uncertain Numbers
- Estadistica Probabilidades
- Common Probability Distribution PDF
- c391x Appendix B
- ch05
- Block Notes
- Inventory Models
- Ptsp Course File
- SQQS1013-Ch4-A122
- MATH PRESENTATION.ppt
- Std12 Stat EM
- ContProbDist4e
- Probability Distribution
- 6D434191d01
- lect03

You are on page 1of 24

Email: fay.sheng@sauder.ubc.ca

Rules of Probability

Chain rule:

𝑃 𝐴𝐵𝐶 = 𝑃[𝐴] × 𝑃[𝐵|𝐴] × 𝑃[𝐶|𝐴𝐵]

Bayes’ rule:

𝑃[𝐴|𝐵] × 𝑃[𝐵]

𝑃𝐵𝐴 =

𝑃[𝐴]

Law of total probability:

𝑃𝐵 = 𝑃[𝐵|𝐴𝑖 ] × 𝑃[ 𝐴𝑖 ]

𝑖

Ex: Witness reliability: Imagine after a robbery the thief

jumped into a taxi and disappeared. An eyewitness on the

crime scene is telling the police that the cab is yellow. In

order to make sure that this testimony is worth something

the assistant DA makes a Bayesian analysis of the situation.

After some research he comes up with the following

information:

In that particular city 80% of taxis are black and 20% of taxis

are yellow.

Eyewitness are not always reliable and from past experience it

is expected that an eyewitness is 80% accurate. He will identify

the color of a taxi accurately (yellow or black) 8 out 10 times.

What is the probability that the testimony is reliable? 50%

Random Variable (RV)

Def 1: A random variable (RV) is a numerical

outcome of a random phenomenon.

Def 2: A random variable (RV) is the set of

possible outcomes and the probabilities associated

with them.

Eg: the face we get when rolling a dice; height;

weight; age, etc.

Random Variable

Discrete Random variable

If it only takes a finite or countable list of

values.

Eg: the outcome of rolling a dice or tossing a

coin

Continuous Random variable

If it can take any values between two values.

Distribution

Discrete Random Variable and Probability

Eg: Throw a dice; the number you get is a discrete

random variable:

Probability

1, w.p. 1/6

2, w.p. 1/6 (Probability

1/6

mass)

X= 3, w.p. 1/6 x

1 2 3 4 5 6

4, w.p. 1/6

Cumulative 1

5, w.p. 1/6 probability 2/3

5/6

1/2

6, w.p. 1/6

1/6

1/3 P(X≤x)

1 2 3 4 5 6 x

function (CDF)

University of British Columbia LIFEI SHENG 6

Distribution

Continuous Random Variable and Probability

Eg: The time between two customers’ arrivals is a

continuous random variable

Probability

density

function f (x)

(PDF)

0 x

Cumulative distribution

1

function (CDF)

x

P(X ≤ x) =

-∞ f (s) ds

0 x

Expectation

Mean/Expectation (denoted as 𝐸[𝑋] or 𝜇)

average outcome or expected value

𝑛

𝐸𝑋 = 𝑖=1 𝑥𝑖 𝑃[𝑋 = 𝑥𝑖 ] if 𝑋 is discrete R.V

+∞

𝐸𝑋 = −∞

𝑥𝑓 𝑥 𝑑𝑥 if 𝑋 is continuous R.V

Variance and Standard Deviation

Variance (denoted as 𝑉𝑎𝑟(𝑋) or 𝜎 2 )

spread of the outcomes

𝑛 2

𝑉𝑎𝑟 𝑋 = (𝑥

𝑖=1 𝑖 −𝐸[𝑋]) 𝑃[𝑋 = 𝑥𝑖 ] if 𝑋 is

discrete R.V

+∞

𝑉𝑎𝑟 𝑋 = −∞

(𝑥 − 𝐸[𝑋])2 𝑓 𝑥 𝑑𝑥 if 𝑋 is

continuous R.V

Standard deviation (denoted as 𝑆𝐷(𝑋) or 𝜎)

𝑆𝐷(𝑋) = 𝑉𝑎𝑟(𝑋)

Expectation and Variance Properties

Assume 𝑎 and 𝑏 are constants; 𝑋 and 𝑌 are

random variables.

(1)Linear Transformation: 𝑎 + 𝑏𝑋

𝐸 𝑎 + 𝑏𝑋 = 𝑎 + 𝑏𝐸 𝑋

𝑉𝑎𝑟 𝑎 + 𝑏𝑋 = 𝑏 2 𝑉𝑎𝑟 𝑋

𝑆𝐷 𝑎 + 𝑏𝑋 = |𝑏|𝑆𝐷(𝑋)

Expectation and Variance Properties

Assume 𝑎 and 𝑏 are constants; 𝑋 and 𝑌 are

random variables.

(2) Linear combination of two independent random

variables: 𝑎𝑋 + 𝑏𝑌

𝐸 𝑎𝑋 + 𝑏𝑌 = 𝑎𝐸(𝑋) + 𝑏𝐸 𝑌

𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 = 𝑎2 𝑉𝑎𝑟 𝑋 + 𝑏 2 𝑉𝑎𝑟 𝑌

𝑆𝐷 𝑎𝑋 + 𝑏𝑌 = 𝑎2 𝑉𝑎𝑟 𝑋 + 𝑏 2 𝑉𝑎𝑟 𝑌

In particular, 𝑎 = 1 and 𝑏 = 1 or −1

Expectation and Variance Properties

Assume 𝑎 and 𝑏 are constants; X and Y are random

variables.

(3) Linear combination of two dependent random

variables: 𝑎𝑋 + 𝑏𝑌

𝐸 𝑎𝑋 + 𝑏𝑌 = 𝑎𝐸(𝑋) + 𝑏𝐸 𝑌

𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 = 𝑎2 𝑉𝑎𝑟 𝑋 + 𝑏 2 𝑉𝑎𝑟 𝑌

+2𝑎𝑏𝑆𝐷 𝑋 𝑆𝐷 𝑌 𝑟

where 𝑟 is the correlation between X and Y.

Coefficient of variation (CV)

CV provides another way to quantify variability

Standard Deviation

CV

Mean

Commonly-used Random Variable

Bernoulli trial

There are only two possible outcomes.

Eg: 0 or 1; head or tail; success or fail; Yes or No, etc

The probability of a success is 𝑝 and it’s the same

for every trial.

The trials are independent.

𝑝, 𝑖𝑓 𝑥 = 1

𝑃(𝑋 = 𝑥) =

1 − 𝑝, 𝑖𝑓 𝑥 = 0

Commonly-used Random Variable

Binomial Random Variable 𝐵(𝑛, 𝑝)

The number of successes in 𝑛 independent

Bernoulli trials.

Discrete: takes value from 0,1, … , 𝑛

𝑛!

𝑃 𝑋=𝑥 = 𝑝𝑘 (1 − 𝑝)𝑛−𝑘 , 𝑝 is the

𝑘! 𝑛−𝑘 !

probability of success

Expectation: 𝜇 = 𝑛𝑝

Variance: 𝜎 2 = 𝑛𝑝(1 − 𝑝)

University of British Columbia LIFEI SHENG 15

Commonly-used Random Variable

Poisson Random Variable 𝑃𝑜(𝜆)

The counts of events that occur randomly in a

Discrete: takes value from 0,1,2 …

𝜆𝑥

𝑃 𝑋=𝑥 = 𝑒 −𝜆

𝑥!

Expectation: 𝜇 = 𝜆

Variance: 𝜎 2 = 𝜆

Commonly-used Random Variable

Uniform Random Variable 𝑈[𝑎, 𝑏]

Continuous

All intervals of the same

length has equal probability

𝑎+𝑏

Expectation: 𝜇 =

2

(𝑏−𝑎)2

Variance: 𝜎 2 =

12

Commonly-used Random Variable

Exponential Random Variable 𝐸𝑥𝑝(𝜆)

Inter-arrival time a

probability

Continuous

Expectation: 𝜇 = 1/𝜆

Cumulative distribution function:

2 2

Variance: 𝜎 = 1/𝜆 Prob{a<=t} = 1 - e–t

0 Time t

The coefficient of

Inter-arrival time a

variation is always 1 Probability density function:

e–t

0 Time t

University of British Columbia LIFEI SHENG 18

Commonly-used Random Variable

Normal Random Variable (IMPORTANT)

Aka: Guassian RV

Continuous

Bell-shape

𝑁(𝜇, 𝜎)

Table: Important discrete and continuous distributions

Ex1: Let 𝑋 be uniformly distributed over (0, 1). Calculate

𝐸[𝑋 3 ].

CDF: 𝐹 𝑦 = 𝑃 𝑌 ≤ 𝑦 = 𝑃 𝑋 3 ≤ 𝑦 = 𝑦1/3

′ 1 −2/3

PDF: 𝑓 𝑦 = 𝐹 𝑦 = 𝑦

3

1 1 1 −2/3 1

Thus, 𝐸 𝑦 = 0

𝑦𝑓 𝑦 𝑑𝑦 = 0

𝑦 𝑦 𝑑𝑦 =

3 4

Ex2: Calculate the expected sum obtained when three fair

21

dice are rolled.

2

∞ 𝑡𝑥 −𝜆𝑥 𝑑𝑥

Ex3: (a) Compute 𝜙 𝑡 = 0

𝑒 𝜆 𝑒 when 𝑡 < 𝜆

(b) Compute 𝜙′ 𝑡 and 𝜙′′ 𝑡

𝜆 𝜆 𝜆

𝜙 𝑡 = ; 𝜙′ 𝑡 = ; 𝜙 ′′ 𝑡 = −2

𝜆 −𝑡 (𝜆 −𝑡)2 (𝜆 −𝑡)3

Themes from Today

Be familiar with the concepts and terminologies

Differentiation and integration will show up in

probability course, and will also occasionally

show up in supply chain management course.

We have seen how to use integration to compute

CDF, expectation and variance of a continuous

random variable.

The courses are unlikely to involve a heavy use

of calculus in assignments

Thank You!

- !Business StatisticsUploaded byJoanne Ferrer
- Probability for FinanceUploaded byDivya Sharma
- Statistics and probabilitiesUploaded byPriscila Constanza
- Dip Image EnhanceUploaded byapi-3823773
- Random VariablesUploaded byMichael Hsiao
- Estadistica ProbabilidadesUploaded byLuis Antonio
- Common Probability Distribution PDFUploaded byJeanette
- ch05Uploaded bySakib Sayed
- Statistics- Random Variables Working With Uncertain NumbersUploaded byDr Rushen Singh
- c391x Appendix BUploaded byRifet Džaferagić
- Block NotesUploaded by.cadeau01
- Inventory ModelsUploaded byRavi Kumar
- Ptsp Course FileUploaded byBnr Goud
- SQQS1013-Ch4-A122Uploaded byAwnieAzizan
- MATH PRESENTATION.pptUploaded byDaphane Kate Aureada
- Std12 Stat EMUploaded byrampilla32
- ContProbDist4eUploaded byJohn Lloyd Alforque
- Probability DistributionUploaded bymahi_111
- 6D434191d01Uploaded bymailstonaik
- lect03Uploaded bymohamed
- Ques.image.markedUploaded byermias
- ques.Image.Marked.pdfUploaded byermias
- Sep 08 - Probability_NotationUploaded byRoberto Antonioli
- Notes Ch 4.1 (Student)Uploaded byagralepois
- P-S-13.pdfUploaded bySajan Kumar
- 00650766Uploaded byEsteban Rodriguez
- Week 07 UniformUploaded byJane Doe
- intro,methodologyUploaded byNorbert Lim
- Expected Value of Random VariablesUploaded byHoniel091112
- AssignmentUploaded byNeha Kandpal

- Mini eBook - Aggregating Data With Apache SparkUploaded bygopi
- 4. Decision Making and Loops.pyUploaded bygopi
- Pandas Cheat SheetUploaded byRoberto
- 9783642539640-c1Uploaded bygopi
- Column-vs-Row.pptUploaded bygopi
- Database Download Tutorials.pdfUploaded bygopi
- Satyam NYTUploaded bygopi
- DiffusionCentrality_ChanhyunUploaded bygopi
- Things to DoUploaded bygopi
- Biovail Case AnswersUploaded bybhatvinayak7
- BiovailUploaded byCliffiandri Adiwibowo
- Linkstreet Student Guide for Online SessionsUploaded bygopi
- lecun2015Uploaded byJohn Sun
- Hands on AssignmentUploaded bygopi
- ielts academic writing - organizing an essayUploaded byHemen Sharadkumar Upadhyaya

- Ch18 SimulationUploaded bybast97
- math 7 commom core syllabus 2015-2016Uploaded byapi-262005456
- Df 160097Uploaded byAhmad Mahyuddin
- mayhsUploaded byNorbert Lim
- Lecture Notes 2Uploaded byazka
- SPE-119197-PA (Continuous Reservoir-Simulation-Model Updating and Forecasting Improves Uncertainty Quantification)Uploaded byAmr Al Sayed
- Poisson ProcessUploaded byHitesh Sen
- Probability and Decision TreesUploaded byrubbydean
- Cryptology 12.10Uploaded bydlr-uk8103
- Are We Living In Nick Bostrom’s SpeculationUploaded byDimitris Yannopoulos
- Ch 13 Probability Multiple Choice Questions (With Answers)Uploaded byCRPF School
- Probability & StatisticsUploaded byJainamMehta
- Beer 1959 What Has Cybernetics to Do With the Operational ResearchUploaded byCamila Pérez Brey
- 7th-math-comprehensive-course-guideUploaded byapi-248181772
- Sample Midterm (99W) 13FUploaded bySteven Zhao
- Limitations of Statistical Methods for Estimating Hydrocarbon ReservesUploaded byHiren Patel
- ALgebra TipqcUploaded byMichael Damian
- SBTET AP C-14 SYLLABUS DAE IV Semester(1)Uploaded bythirukumar
- FIN 3331 Risk and Return AssignmentUploaded byHelen Joan Bui
- Probability and Statistics (Tanton)Uploaded byNeutron
- 4.1 notes2Uploaded bySunil Kumar
- ProbabilityUploaded bystarlet8
- Developing a Tennis Model That Reflects OutcomeUploaded byYuri Lookin
- RP1 IntroductionUploaded byMalik Muhammad Zaeem
- FDFFSFSWGUploaded bymohammed_fathelbab
- Cumilative Distribution FunctionUploaded byabhi_bhatye
- NT TR 427_Guidelines for Development of NDE Acceptance Criteria_Nordtest Technical ReportUploaded byvrapciudorian
- Certain or Impossible WorksheetsUploaded bySha Mercs
- Linear RegressionUploaded by07bs3326
- Mathematical Exploration StatisticsUploaded byanhhuyalex