šŸ““
Compendium
  • Information
  • Ideas
    • Project Names
    • Indie Game Names
  • Data Science
    • Mathematics
      • Probability
        • Bayesian Inference
        • Combinatorics
      • Statistics
    • Machine Learning
      • Advanced Statistical Methods in Python
      • Linear Regression
      • Logistic Regression
      • Cluster Analysis
      • Deep Learning
Powered by GitBook
On this page
  • Variations With Repetition
  • Variations Without Repetition
  • Combinations

Was this helpful?

  1. Data Science
  2. Mathematics
  3. Probability

Combinatorics

The math behind variations, permutations, and combinations.

Variations With Repetition

Variations are the total number of ways to pick and arrange some elements of a given set

For example, a lock with 2 letter code, each can be A, B, or C. If A was chosen for 1st letter, 3 variations exist for the second letter. Total variations are 3 * 3 = 9.

Vpnˉ=np\bar{V^{n}_{p}} = n^{p}Vpn​ˉ​=np

The number of variations with repetition when picking p-many elements out of n elements, is equal to n to the power of p.

Variations Without Repetition

Once an element has been chosen, it cannot be used or considered again in future calculations.

A simple formula to calculate permutations for n slots for n elements.

n!n!n!

Formal notation and formula for the scenario:

Vpnˉ=n!(nāˆ’p)!\bar{V^{n}_{p}} = \frac{n!}{(n-p)!}Vpn​ˉ​=(nāˆ’p)!n!​

The number of variations without repetition when arranging p elements out of a total of n.

Combinations

Order in which elements are chosen are not relevant, just that each element is different.

We can say that all the different permutations of a single combination are different variations.

Cpn=n!p!(nāˆ’p)!C^{n}_{p} = \frac{n!}{p!(n-p)!}Cpn​=p!(nāˆ’p)!n!​

The number of combinations for choosing p-many elements out of a sample space of n elements. The number of combinations equals the number of variations over the number of permutations.

Combination Symmetry

The more chosen elements, the lesser the combinations. We can pick p-many elements in as many ways as we can pick n - p many elements.

Cpn=Cnāˆ’pnC^{n}_{p} = C^{n}_{n-p}Cpn​=Cnāˆ’pn​

Combinations With Separate Sample Spaces

E.g. You are at a restaurant, need to buy a sandwich (3 choices), a side (2 choices), and a drink (2 choices). Think of each section (sandwich, side, drink), together, and multiply the choices available for each.

3āˆ—2āˆ—2=123 * 2 * 2 = 123āˆ—2āˆ—2=12
PreviousBayesian InferenceNextStatistics

Last updated 4 years ago

Was this helpful?