https://www.analyticsvidhya.com/blog/2019/10/mathematics-behind-machine-learning/

Data Science & Machine Learning (AI is a sub-discipline) overlap but not the same:

https://www.analyticsvidhya.com/blog/2019/10/mathematics-behind-machine-learning/

Data Science & Machine Learning (AI is a sub-discipline) overlap but not the same:

Advanced Programming needs Advanced Math: eg.

Video Game **Animation**: Verlet Integration

**AI**: Stats, Probability, Calculus, Linear Algebra

**Search Engine** : PageRank: Linear Algebra

**Abstraction** in Program “Polymorphism” : Monoid, Category, Functor, Monad

Program “**Proof**” : Propositions as Types, HoTT

https://awalterschulze.github.io/blog/post/neglecting-math-at-university/

Abstraction: Monoid, Category

Category

Key Concepts:

- Median, Skewed, Variance, Standard Deviation
- Uniform, Normal / Poisson Distribution
- Baeysian Probability
- Over & Under Sampling
- Dimensionality Reduction

http://www.businessinsider.com/heres-when-math-says-you-should-start-to-care-about-powerball-2013-9

The Expected Value of winning jackpot by the $2 lottery ticket is negative.

Interesting lesson in Probability!

By Bayes’s Theorem

http://en.m.wikipedia.org/wiki/Bayes’_theorem

1. First WTC (World Trade Center) Attack:

Prior Probability

Initial estimate that terrorists would crash planes into Manhattan skyscrapers = 1/20,000 = x = 0.005%

New Event: 1st Plane hits WTC

Probability of plane hitting if terrorists are attacking Manhattan skyscrapers = y = 100%

Probability of plane hitting if terrorists are NOT attacking Manhattan skyscrapers (ie accident) = z = 2 cases in last 25,000 days (once in 1945, another in 1946) = 1/12,500 = 0.008%

Posterior Probability

Revised estimate of probability of terror attack, given first plane hitting WTC =

2. Second WTC Attack

Now 38% becomes the prior probability = x

y, z remain the same.

Reapply the Bayes’s Theorem:

Posterior Probability

Revised estimate of probability of terror attack, given 2nd plane hitting WTC =

There was a 18-minute interval between the first and the second attack. If someone who had calculated the Bayesian Math to predict 99.99% chance of the would-be second attack, the entire people on the second building could have been evacuated right after the first tower attack, instead of being advised naively (0.01% chance it was safe) to return to their office in the second tower !

You can say this is *déjà-vu,* but it is Math which could have saved thousands of life on that tragic day of 9/11.

Watch this disturbing documentary video of the 9/11 Attack:

Today Probability is a “money” Math, used in Actuarial Science, Derivatives (Options) in Black-Scholes Formula.

In the beginning it was “A Priori” Probability by Pascal (1623-1662), then Fermat (1601-1665) invented today’s “A Posteriori” Probability.

“A Priori” assumes every thing is naturally “like that”: eg. Each coin has 1/2 chance for head, 1/2 for tail. Each dice has 1/6 equal chance for each face (1-6).

“A Posteriori” by Fermat, then later the exile Protestant French mathematician De Moivre (who discovered Normal Distribution), is based on observation of “already happened” statistic data.

Cardano (1501-1576) born 150 years earlier than Pascal and Fermat, himself a weird genius in Medicine, Math and an addictive gambler, found the rule of + and x for chances (he did not know the name ‘Probability’ then ):

**Addition + Rule**: throw a dice, chance to get a “1 and 2” faces:

1/6 +1/6 = 2/6 = 1/3

(Correct: 1 & 2 out of other six faces)

**Multiplication x Rule**: throw two dices, chance to get a “1 followed by a 2 ” faces : 1/6 x 1/6 = 1/36

(Assume 1st throw does not affect or influence the 2nd throw: independent events)

Pascal never met Fermat personally, only through correspondences (like emails today), but Pascal regarded with respect Fermat as superior in Math than himself.

Fermat and Descartes were not so. Descartes openly criticized Fermat as a second class mathematician. Both independently discovered Analytical Geometry, but Descartes scored the credit in ‘Cartesian’ coordinates.

Fermat never published any books in Math. As a successful judge in Toulous, he spent his free time as an amateur mathematician, especially in Number Theory. He showed his Math discoveries to friends in letters but never provided proofs. Hence the Fermat’s Last Theorem made the world mathematicians after him (Gauss, Euler, Kummer, Sophie Germaine, Andrew Wiles…) busy for 380 years until 1994.

Fermat died 3 years after Pascal. Another Modern Mathematics was being born – Calculus – in UK by Newton and Germany by Leibniz. Probability was put in the back seat over-taken by Calculus.

SARS Probability

A group of tourists at airport are screened for temperature twice thru Gate A (accuracy a=98%), then Gate B (accuracy b=97%).

Finding: Gate A detected 32 (=A) tourists, but Gate B only 23 (=B), of which 16(=C) are common.

Q: How many suspects missed out (suspects missed) ?

**Solution:**

Let T = Total tourists

a, b the probability of successful detection at Gate A, B, resp.

A=aT , B=bT

AB=(aT)(bT)=(abT).T

C= a.bT (because Gates A, B independent screening)

AB=C.T

T=AB/C

Suspects-detected= A + B – C (exclude duplicate common)

Suspects-missed **M** = T- (A+B-C) = AB/C -(A+B-C) =(AB-AC-BC+C.C)/C= (A-C)(B-C)/C

**M =(A-C)(B-C)/C**

Note: *M independent of a, b* !!

Suspects-missed **M** = (32-16)(23-16)/16 = 16×7/16 = 7 [QED]

Throw 2 dies, the sum of points i, j and probability P (i+j):

2(1/36) 3(1/18) 4(1/12) 5(1/9) 6(5/36) 7(1/6)

8(5/36) 9(1/9) 10(1/12) 11(1/18) 12(1/36)

=> Bell curve symmetric both sides, peak 1/6 (sum 7).