Skip to Content
40 Algorithms Every Programmer Should Know
book

40 Algorithms Every Programmer Should Know

by Imran Ahmad
June 2020
Intermediate to advanced
382 pages
11h 39m
English
Packt Publishing
Content preview from 40 Algorithms Every Programmer Should Know

Calculating probabilities

Naive Bayes is based on probability fundamentals. The probability of a single event occurring (the observational probability) is calculated by taking the number of times the event occurred and dividing it by the total number of processes that could have led to that event. For example, a call center receives over 100 support calls per day, 50 times over the course of a month. You want to know the probability that a call is responded to in under 3 minutes based on the previous times it was responded to. If the call center manages to match this time record on 27 occasions, then the observational probability of 100 calls being answered in under 3 minutes is as follows:

P(100 support calls in under 3 mins) = (27 / 50) ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

50 Algorithms Every Programmer Should Know - Second Edition

50 Algorithms Every Programmer Should Know - Second Edition

Imran Ahmad
Grokking Algorithms

Grokking Algorithms

Aditya Bhargava

Publisher Resources

ISBN: 9781789801217Supplemental Content