Below you will find pages that utilize the taxonomy term “Math”
September 21, 2020
Deriving Average Without Totals
Even an old dog like me learns something new every day.
Let’s say you need a program that receives a sequence of numbers and output the current average. How do you do this efficiently? The naive solution is to to keep track of two variables:
total # add up all numbers seen so far
count # a count of how many numbers seen so far
This way, at any step, you can calculate the current average using total/count
.
Pagesread more
Vocabulary
- bind
- Sometimes a synonym for “map”
- conflate
- combine
- disjoint
- separate, e.g., odd numbers and even numbers are disjoint
- disjunction
- inclusive or – if one of the inputs is
True
- extrinsic
- not intrinsic
- federated
- Top-down delegation of responsibilities; Has a single point of failure at the top.
- PID controller
- control loop feedback mechanism
- e.g., curise control
- 99%ile
- Abbreviation of percentile
- EBNF
- Extended Backus-Naur Form
- Useful for defining the syntax of a programming language
- EBNF terminal
- a token/word/chunk in EBNF
- Alpha
- Αα
- Beta
- Ββ
- Gamma
- Γγ
- Delta
- Δδ
- Commonly denotes ‘difference’
- Epsilon
- Εε
- Used in Greedy-Epsilon algo for multi-armed bandit problems
- Error margin in floating point comparisons.
- Zeta
- Ζζ
- Eta
- Ηη
- Theta
- Θθ
- Iota
- Ιι
- Kappa
- Κκ
- Lambda
- Λλ
- Mu
- Μμ
- Nu
- Νν
- Xi
- Ξξ
- Omicron
- Οο
- Pi
- Ππ
- Rho
- Ρρ
- Sigma
- Σσς
- Tau
- Ττ
- Upsilon
- Υυ
- Phi
- Φφ
- Chi
- Χχ
- Psi
- Ψψ
- Union
- ∪
- Aleph
- ℵ
- Symbol for cardinal numbers. ℵ is pronounced as Aleph-null.
- Empty Set
- ∅
- Such That
- Commonly represented as a colon,
:
- Example,
D={x^2|x ∈ N, x >=1, x <= 4}
. This reads D is the set of all x^2 SUCH THAT: 1) x is a natural number; 2) x is greater or equal to 1; 3) x is less than or equal to 4. - Intersection
- ∩
- Subset
- ⊂ or ⊆
- e.g., if A = {1,4,9} and B = {1,4}, then B ⊂ A (B is a subset of A).
- Belongs To
- ∈
- ∉ Means “not belong”.
- To say that 1 belongs to S, we write 1 ∈ S.
- e.g., if A = {1,4,9} and e = 4, then we say e∈A, meaning “e belongs to A”. However, one would not say e⊂A – e is a single element, not a set. Similarly, if B = {1,4}, one would not say B∈A or “B belongs to A”, as B is a set not a single element.
- Complements
- Difference between two sets
- Relative Complement
- A\B means objects that belong to A and not to B. i.e., {1,2,3}{3} == {1,2}
- Omega
- Ωω
- P(A|B)
- The likelihood of event A occurring given that B is true.
- P(A^C)
- The probability that A doesn’t happen
- Precision Recall
- Precision = probability that some retreived doc is relevant; Recall = probability that some relevant doc was retreived.
- Narrow Integration Tests
- exercise only that portion of the code in a service that talks to a separate service; uses test doubles of those services, either in process or remote; thus consist of many narrowly scoped tests, often no larger in scope than a unit test (and usually run with the same test framework that’s used for unit tests)
- Broad Integration Tests
- require live versions of all services, requiring substantial test environment and networ access; exercise code paths through all services, not just code responsible for interactions
- Balanced Binary Search Tree
- For example, red-black tree or AVL tree.
- Natural Numbers
- ℕ
- double-struck N
- Cardinal numbers,
- Complex Numbers
- ℂ
- double-struck C