student notes / est. for the classroom

HTML, CSS, JavaScript, Python, data science, computer networks — written the way you'd explain it to a classmate, not a compiler.

Top Job & Internship Portals

Handpicked portals for fresher jobs, tech roles, and listings in Hyderabad

GFG

GeeksforGeeks

Tech & Software Roles

Visit →
INT

Internshala

Fresher Jobs & Internships

Visit →
GOOG

Google Careers

Global Google Openings

Visit →
APN

Apna Jobs

Local Jobs in Hyderabad

Visit →
INS

Instahyre

Tech Roles in Hyderabad

Visit →
NAUK

Naukri.com

Fresher Jobs in Hyderabad

Visit →
📢 Updated daily

Internship & Job Alerts

01

Latest notes

August 24, 2023

GATE DA(Data Science & Artificial Intelligence)

 Permutation and Combination

Permutation and Combination are the most fundamental concepts in mathematics and with these concepts, a new branch of mathematics is introduced to students i.e., combinatorics. Permutation and Combination are the ways to arrange a group of objects by selecting them in a specific order and forming their subsets. To arrange groups of data in a specific order permutation and combination formulas are used. Selecting the data or objects from a certain group is said to be permutation, whereas the order in which they are arranged is called a combination. 

In this article we will study the concept of Permutation and Combination and their formulas, using these to solve many sample problems as well.

Permutation

Permutation is the distinct interpretations of a provided number of components carried one by one, or some, or all at a time. For example, if we have two components A and B, then there are two likely performances, AB and BA.

A numeral of permutations when ‘r’ components are positioned out of a total of ‘n’ components is n Pr. For example, let n = 3 (A, B, and C) and r = 2 (All permutations of size 2). Then there are 3P2 such permutations, which is equal to 6. These six permutations are AB, AC, BA, BC, CA, and CB. The six permutations of A, B, and C taken three at a time are shown in the image added below:

Permutation Formula

Permutation formula is used to find the number of ways to pick r things out of n different things in a specific order and replacement is not allowed and is given as follows:

Explanation of Permutation Formula

As we know, permutation is a arrengement of r things out of n where order of arrengement is important( AB and BA are two different permutation). If there are three different numerals 1, 2 and 3 and if someone is curious to permute the numerals taking 2 at a moment, it shows (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), and (3, 2). That is it can be accomplished in 6 methods. 

Here, (1, 2) and (2, 1) are distinct. Again, if these 3 numerals shall be put handling all at a time, then the interpretations will be (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2) and (3, 2, 1) i.e. in 6 ways. 

In general, n distinct things can be set taking r (r < n) at a time in n(n – 1)(n – 2)…(n – r + 1) ways. In fact, the first thing can be any of the n things. Now, after choosing the first thing, the second thing will be any of the remaining n – 1 things. Likewise, the third thing can be any of the remaining n – 2 things. Alike, the rth thing can be any of the remaining n – (r – 1) things. 

Hence, the entire number of permutations of n distinct things carrying r at a time is n(n – 1)(n – 2)…[n – (r – 1)] which is written as n Pr. Or, in other words, 


' alt="\bold{{}^nP_r = \frac{n!}{(n-r)!} }" class="ql-img-inline-formula quicklatex-auto-format" title="Rendered by QuickLaTeX.com" v:shapes="_x0000_i1025">

Combination

It is the distinct sections of a shared number of components carried one by one, or some, or all at a time. For example, if there are two components A and B, then there is only one way to select two things, select both of them.

For example, let n = 3 (A, B, and C) and r = 2 (All combinations of size 2). Then there are 3C2 such combinations, which is equal to 3. These three combinations are AB, AC, and BC.

Here, the combination of any two letters out of three letters A, B, and C is shown below, we notice that in combination the order in which A and B are taken is not important as AB and BA represent the same combination.

 GIT HUB projects

 

SCAN this QR code to connect with git hub projects

Note: In the same example, we have distinct points for permutation and combination. For, AB and BA are two distinct items i.e., two distinct permutation, but for selecting, AB and BA are the same i.e., same combination.

Combination Formula

Combination Formula is used to choose ‘r’ components out of a total number of ‘n’ components, and is given by:

 

Using the above formula for r and (n-r), we get the same result. Thus,

' alt="\bold{{}^nC_r = {}^nC_{(n-r)}}" class="ql-img-inline-formula quicklatex-auto-format" title="Rendered by QuickLaTeX.com" v:shapes="_x0000_i1026">

Explanation of Combination Formula

Combination, on the further hand, is a type of pack. Again, out of those three numbers 1, 2, and 3 if sets are created with two numbers, then the combinations are (1, 2), (1, 3), and (2, 3). 

Here, (1, 2) and (2, 1) are identical, unlike permutations where they are distinct. This is written as 3C2. In general, the number of combinations of n distinct things taken r at a time is, 

' alt="\bold{{}^nC_r = \frac{n!}{r!\times(n-r)!} = \frac{{}^nP_r}{r!}}" class="ql-img-inline-formula quicklatex-auto-format" title="Rendered by QuickLaTeX.com" v:shapes="_x0000_i1027">

Derivation of Permutation and Combination Formulas

We can derive these Permutation and Combination formulas using the basic counting methods as these formulas represent the same thing. Derivation of these formulas is as follows:

Derivation of Permutations Formula

Permutation is selecting r distinct objects from n objects without replacement and where the order of selection is important, by the fundamental theorem of counting and the definition of permutation, we get

P (n, r) = n . (n-1) . (n-2) . (n-3).  . . .  .(n-(r+1))

By Multiplying and Dividing above with (n-r)! = (n-r).(n-r-1).(n-r-2).  . . .  .3. 2. 1, we get

P (n, r) = [n.(n−1).(n−2)….(nr+1)[(n−r)(n−r−1)(n-r)!] / (n-r)!

⇒ P (n, r) = n!/(n−r)!

Thus, the formula for P (n, r) is derived.

Derivation of Combinations Formula

Combination is choosing r items out of n items when the order of selection is of no importance. Its formula is calculated as,

C(n, r) = Total Number of Permutations /Number of ways to arrange r different objects. 
[Since by the fundamental theorem of counting, we know that number of ways to arrange r different objects in r ways = r!]

C(n,r) = P (n, r)/ r!

⇒ C(n,r) = n!/(n−r)!r!

Thus, the formula for Combination i.e., C(n, r) is derived.

Difference Between Permutation and Combination

Various differences between the permutation and combination can be understood by the following table:

Permutation

Combination

In Permutation order of arrangement is important.
For example, AB and BA are different combinations.

In Combination order of arrangement is not important.
For example, AB and BA are the same combinations.

A permutation is used when different kinds of things 
are to be sorted or arranged.

Combinations are used when the same kind of things are to
be sorted.

Permutation of two things out of three given things 
a, b, c is ab, ba, bc, cb, ac, ca.

the combination of two things from three given things
a, b, c is ab, bc, ca.

Formula for permuation is: n Pr = n!/(n – r)!

The formula for Combination is:  n Cr = n! /{r! × (n – r)!}

Solved Examples on Permutation and Combination

Example 1: Find the number of permutations and combinations of n = 9 and r = 3.

Solution: 

Given, n = 9, r = 3

Using the formula given above:

For Permutation:

nPr = (n!) / (n – r)! 

⇒ nPr = (9!) / (9 – 3)! 

⇒ nPr = 9! / 6! = (9 × 8 × 7 × 6! )/ 6! 

⇒ nPr = 504

For Combination:

nCr = n!/r!(n − r)!

⇒ nCr = 9!/3!(9 − 3)!

⇒ nCr = 9!/3!(6)!

⇒ nCr = 9 × 8 × 7 × 6!/3!(6)!

⇒ nCr = 84

Example 2: In how many ways a committee consisting of 4 men and 2 women, can be chosen from 6 men and 5 women?

Solution:

Choose 4 men out of 6 men = 6C4 ways = 15 ways

Choose 2 women out of 5 women = 5C2 ways = 10 ways

The committee can be chosen in 6C4 × 5C2  = 150 ways.

Example 3: In how many ways can 5 different books be arranged on a shelf?

Solution: 

This is a permutation problem because the order of the books matters. 

Using the permutation formula, we get:

5P5 = 5! / (5 – 5)! = 5! / 0! = 5 x 4 x 3 x 2 x 1 = 120

Therefore, there are 120 ways to arrange 5 different books on a shelf.

Example 4: How many 3-letter words can be formed using the letters from the word “FABLE”?

Solution: 

This is a permutation problem because the order of the letters matters. 

Using the permutation formula, we get:

5P3 = 5! / (5 – 3)! = 5! / 2! = 5 x 4 x 3 = 60

Therefore, there are 60 3-letter words that can be formed using the letters from the word “FABLE”.

Example 5: A committee of 5 members is to be formed from a group of 10 people. In how many ways can this be done?

Solution: 

This is a combination problem because the order of the members doesn’t matter. 

Using the combination formula, we get:

10C5 = 10! / (5! x (10 – 5)!) = 10! / (5! x 5!) 

⇒10C5= (10 x 9 x 8 x 7 x 6) / (5 x 4 x 3 x 2 x 1) = 252

Therefore, there are 252 ways to form a committee of 5 members from a group of 10 people.

Example 6: A pizza restaurant offers 4 different toppings for their pizzas. If a customer wants to order a pizza with exactly 2 toppings, in how many ways can this be done?

Solution: 

This is a combination problem because the order of the toppings doesn’t matter. 

Using the combination formula, we get:

4C2 = 4! / (2! x (4 – 2)!) = 4! / (2! x 2!) = (4 x 3) / (2 x 1) = 6

Therefore, there are 6 ways to order a pizza with exactly 2 toppings from 4 different toppings.

Example 7: How considerable words can be created by using 2 letters from the term“LOVE”?

Solution: 

The term “LOVE” has 4 distinct letters.

Therefore, required number of words = 4P2 = 4! / (4 – 2)!

Required number of words = 4! / 2! = 24 / 2

⇒ Required number of words = 12

Example 8: Out of 5 consonants and 3 vowels, how many words of 3 consonants and 2 vowels can be formed?

Solution:

Number of ways of choosing 3 consonants from 5 = 5C3

Number of ways of choosing 2 vowels from 3 = 3C2

Number of ways of choosing 3 consonants from 2 and 2 vowels from 3 = 5C3 × 3C2

⇒ Required number = 10 × 3

= 30

It means we can have 30 groups where each group contains a total of 5 letters (3 consonants and 2 vowels).

Number of ways of arranging 5 letters among themselves

= 5! = 5 × 4 × 3 × 2 × 1 = 120

Hence, the required number of ways = 30 × 120

⇒ Required number of ways = 3600

Example 9: How many different combinations do you get if you have 5 items and choose 4?

Solution:

Insert the given numbers into the combinations equation and solve. “n” is the number of items that are in the set (5 in this example); “r” is the number of items you’re choosing (4 in this example):

C(n, r) = n! / r! (n – r)! 

⇒ nCr = 5! / 4! (5 – 4)!

⇒ nCr = (5 × 4 × 3 × 2 × 1) / (4 × 3 × 2 × 1 × 1)

⇒ nCr = 120/24 

⇒ nCr = 5

The solution is 5.

Example 10: Out of 6 consonants and 3 vowels, how many expressions of 2 consonants and 1 vowel can be created?

Solution:

Number of ways of selecting 2 consonants from 6 = 6C2

Number of ways of selecting 1 vowels from 3 = 3C1

Number of ways of selecting 3 consonants from 7 and 2 vowels from 4.

⇒ Required ways = 6C2 × 3C1

⇒ Required ways = 15 × 3

⇒ Required ways= 45

It means we can have 45 groups where each group contains a total of 3 letters (2 consonants and 1 vowels).

Number of ways of arranging 3 letters among themselves = 3! = 3 × 2 × 1

⇒ Required ways to arrenge three letters = 6

Hence, the required number of ways = 45 × 6

⇒ Required ways = 270

Example 11: In how many distinct forms can the letters of the term ‘PHONE’ be organized so that the vowels consistently come jointly?

Solution:

The word ‘PHONE’ has 5 letters. It has the vowels ‘O’,’ E’, in it and these 2 vowels should consistently come jointly. Thus these two vowels can be grouped and viewed as a single letter. That is, PHN(OE).

Therefore we can take total letters like 4 and all these letters are distinct.

Number of methods to organize these letters = 4! = 4 × 3 × 2 × 1

⇒ Required ways arrenge letters = 24

All the 2 vowels (OE) are distinct.

Number of ways to arrange these vowels among themselves = 2! = 2 × 1

⇒ Required ways to arrange vowels = 2

Hence, the required number of ways = 24 × 2

⇒ Required ways = 48.

FAQs on Permutations and Combinations

Q1: What is the factorial formula?

Answer:

Factorial formula is used for the calculation of permutations and combinations. The factorial formula for n! is given as

n! = n × (n-1) × . . . × 4 × 3 × 2 × 1

For example, 3! = 3 × 2 × 1 = 6 and 5! = 5 × 4 × 3 × 2 × 1 = 120.

Q2: What does nCr represent?

Answer:

nCr represents the number of combinations that can be made from “n” objects taking “r” at a time.

Q3: What do you mean by permutations and combinations?

Answer:

A permutation is an act of arranging things in a specific order. Combinations are the ways of selecting r objects from a group of n objects, where the order of the object chosen does not affect the total combination.

Q4: Write examples of permutations and combinations.

Answer:

The number of 3-letter words that can be formed by using the letters of the word says, HELLO; 5P3 = 5!/(5-3)! this is an example of a permutation.
The number of combinations we can write the words using the vowels of the word HELLO; 5C2 =5!/[2! (5-2)!], this is an example of a combination.

Q5: Write the formula for finding permutations and combinations.

Answer:

·         Formula for calculating permutations: nPr = n!/(n-r)!

·         Formula for calculating combinations: nCr = n!/[r! (n-r)!]

Q6: Write some real-life examples of permutations and combinations.

Answer:

Sorting of people, numbers, letters, and colors are some examples of permutations.
Selecting the menu, clothes, and subjects, are examples of combinations.

Q7: What is the value of 0!?

Answer:

The value of 0! = 1, is very useful in solving the permutation and combination problems.

 


Mutually exclusive events are those events that do not occur at the same time. For example, when a coin is tossed then the result will be either head or tail, but we cannot get both the results. Such events are also called disjoint events since they do not happen simultaneously. If A and B are mutually exclusive events then its probability is given by P(A Or B) or P (A U B). Let us learn the formula of P (A U B) along with rules and examples here in this article.

What are Mutually Exclusive Events?

In probability theory, two events are said to be mutually exclusive if they cannot occur at the same time or simultaneously. In other words, mutually exclusive events are called disjoint events. If two events are considered disjoint events, then the probability of both events occurring at the same time will be zero.

If A and B are the two events, then the probability of disjoint of event A and B is written by:

Probability of Disjoint (or) Mutually Exclusive Event = P ( A and B) = 0

How to Find Mutually Exclusive Events?

In probability, the specific addition rule is valid when two events are mutually exclusive. It states that the probability of either event occurring is the sum of probabilities of each event occurring. If A and B are said to be mutually exclusive events then the probability of an event A occurring or the probability of event B occurring that is P (a ∪ b) formula is given by P(A) + P(B), i.e.,

  • P (A Or B) = P(A) + P(B)
  • P (A ∪ B) = P(A) + P(B)

Note:

If the events A and B are not mutually exclusive, the probability of getting A or B that is P (A ∪ B) formula is given as follows:

P (A ∪ B) = P(A) + P(B) – P (A and B)

Real-life Examples on Mutually Exclusive Events

Some of the examples of the mutually exclusive events are:

  • When tossing a coin, the event of getting head and tail are mutually exclusive. Because the probability of getting head and tail simultaneously is 0.
  • In a six-sided die, the events “2” and “5” are mutually exclusive. We cannot get both the events 2 and 5 at the same time when we threw one die.
  • In a deck of 52 cards, drawing a red card and drawing a club are mutually exclusive events because all the clubs are black.

Dependent and Independent Events

Two events are said to be dependent if the occurrence of one event changes the probability of another event. Two events are said to be independent events if the probability of one event does not affect the probability of another event. If two events are mutually exclusive, they are not independent. Also, independent events cannot be mutually exclusive.

Rules for Mutually Exclusive Events

In probability theory, two events are mutually exclusive or disjoint if they do not occur at the same time. A clear case is the set of results of a single coin toss, which can end in either heads or tails, but not for both. While tossing the coin, both outcomes are collectively exhaustive, which suggests that at least one of the consequences must happen, so these two possibilities collectively exhaust all the possibilities. Though, not all mutually exclusive events are commonly exhaustive. For example, the outcomes 1 and 4 of a six-sided die, when we throw it, are mutually exclusive (both 1 and 4 cannot come as result at the same time) but not collectively exhaustive (it can result in distinct outcomes such as 2,3,5,6).

From the definition of mutually exclusive events, certain rules for probability are concluded.

  • Addition Rule: P (A + B) = 1
  • Subtraction Rule: P (A U B)’ = 0
  • Multiplication Rule: P (A ∩ B) = 0

There are different varieties of events also. For instance, think of a coin that has a Head on both the sides of the coin or a Tail on both sides. It doesn’t matter how many times you flip it, it will always occur Head (for the first coin) and Tail (for the second coin). If we check the sample space of such experiment, it will be either { H } for the first coin and { T } for the second one. Such events have single point in the sample space and are called  “Simple Events”. Such kind of two sample events is always mutually exclusive.

Conditional Probability for Mutually Exclusive Events

Conditional probability is stated as the probability of an event A, given that another event B has occurred. Conditional Probability for two independent events B has given A is denoted by the expression P( B|A) and it is defined using the equation

P(B|A)= P (A ∩ B)/P(A)

Redefine the above equation using multiplication rule: P (A ∩ B) = 0

P(B|A)= 0/P(A)

So the conditional probability formula for mutually exclusive events is:

P (B | A) = 0


Event

An event is a set of outcomes(one or more) from an experiment. It can be like “Getting a Tail when tossing a coin is an event”, “Choosing a King from a deck of cards (any of the 4 Kings) is also an event”, “Rolling a 5 is an event” etc.

Events can be:

·         Independent Each event is not affected by other events. Example: Tossing a coin two times. The outcome of tossing the coin for the first time will not affect the outcome of the second event.

·         Dependent (also called Conditional) An event is affected by other events. Example: Drawing 2 Cards from a Deck. After taking one card from the deck there are fewer cards available, so the probabilities change!

·         Mutually Exclusive Two events can’t happen at the same time. Example: We can play football & rugby at the same time in the same football ground.

Probability

Probability is the likelihood of an event occurring. Many events can’t be predicted with total certainty. The best we can say is how likely they are to happen, using the idea of probability.

‌Joint Probability

Joint probability is the likelihood of more than one event occurring at the same time P(A and B). The probability of event A and event B occurring together. It is the probability of the intersection of two or more events written as p(A ∩ B).

Example: The probability that a card is a four and red =p(four and red) = 2/52=1/26. (There are two red fours in a deck of 52, the 4 of hearts and the 4 of diamonds).

Conditions for Joint Probability

·         One is that events X and Y must happen at the same time. Example: Throwing two dice simultaneously.

·         The other is that events X and Y must be independent of each other. That means the outcome of event X does not influence the outcome of event Y.
Example: Rolling two Dice.

·         If the following conditions met, then P(A∩B) = P(A) * P(B).

What will happen if we find the joint probability of two dependent events?

‌Let Event X is the probability there are clouds in the sky and Event Y is the probability that it rains. Everyone knows that rain comes from clouds. So rain can only fall when there are clouds in the sky. That means the presence of clouds will influence the chances of rain, and that means these two events are NOT independent!
Joint probability cannot be used to determine how much the occurrence of one event influences the occurrence of another event. Therefore the joint probability of X and Y (two dependent events) will be P(Y).
The joint probability of two disjoint events will be 0 because both the events cannot happen together.

So, unless or until we find how much the occurrence of one event influences the occurrence of another event, We cannot properly find the joint probability of two events. In order to solve this, Conditional Probability came to rescue us.

Conditional Probability

‌The conditional probability of an event B is the probability that the event will occur given the knowledge that an event A has already occurred. It is denoted by P(B|A).

So now, The joint probability of two dependent events becomes ‌P(A and B) = P(A)P(B|A)

Bayes Theorem

We know that,

P(A and B) = P(A)P(B|A) and P(B and A) = P(B)P(A|B)

When we equate this we will get, P(A)P(B|A) = P(B)P(A|B), then ‌

P(A|B) = P(A) P(B|A) / P(B)

This is the Bayes theorem

‌It tells: how often A happens given that B happens, written P(A|B),
When we know: how often B happens given that A happens, written P(B|A)
and how likely A is on its own, written P(A)
and how likely B is on its own, written P(B)

In Machine Learning terms, Change A as Hypothesis and B as Evidence, then

‌P(A|B) = P(A) P(B|A) / P(B) becomes P(H|E) = P(H) P(E|H) / P(E)

‌This relates the probability of the hypothesis before getting the evidence P(H) — prior probability, to the probability of the hypothesis after getting the evidence P(H|E) — posterior probability. The factor that relates the two, P(E|H) / P(E), is called the likelihood ratio.

Bayes Theorem states that “The posterior probability equals the prior probability times the likelihood ratio”.

Prior & Posterior Probability

·         Posterior probability is the probability an event will happen after all evidence has been taken into account.

·         Prior probability is the probability an event will happen before you take any new evidence into account.

·         You can think of posterior probability as an adjustment on the prior probability

·         Posterior = ( Likelihood * Prior ) / Evidence

Hypothesis, Evidence & Likelihood

·         The hypothesis is your “guess” at what will occur. It is a testable assertion.

·         Evidence will support or oppose the hypothesis.

·         The Likelihood is the chance or probability that one thing will happen.



MEAN MEDIAN MODE AND VARIANCE

The Main Concepts in Statistics Are 

  • Mean

  • Median

  • Mode

  • Standard deviation

  • Variance


Let Us Understand the Above 5 Statistics Formulas With Examples : 

  • Mean: The arithmetical mean is the sum of a set of numbers separated by the number of numbers in the collection, or simply the mean or the average.

  • Median: In a sorted, ascending or descending, list of numbers, the median is the middle number and may be more representative of that data set than the average.

(Image to be added soon)

  • Mode: The mode is the value that most frequently appears in a data value set.

(Image to be added soon)

  • Standard Deviation: A calculation of the amount of variance or dispersion of a set of values is the standard deviation.

(Image to be added soon)

  • Variance: The expectation of the square deviation of a random variable from its mean is variance.

Now let us look at the formula of statistics that can be used while solving the problems.


Basic Statistics Formulas

To solve statistical problems, there are few formulas of statistics that will be used the most, they are as follows :


In simple words, both correlation and covariance show the relationship and the dependency between two variables.

  • Covariance shows the direction of the path of the linear relationship between the variables while a function is applied to them.

  • Correlation on the contrary measures both the power and direction of the linear relationship between two variables.

In simple terms, correlation is a function of the covariance. The fact that differentiates the two is that covariance values are not standardized while correlation values are. The correlation coefficient of two variables can be obtained by dividing the covariance values of these variables by the multiplication of the standard deviations of the given values.

Covariance is a quantitative calculation that shows the extent to which the deviation function of one variable from its mean matches the deviation of the other function from its mean. It is a mathematical relationship that is defined as −

Cov(X,Y)=E[(X−E[X])(Y−E[Y])]

In the given equation above,

  • If X and Y are both valued above their respective means, or if X and Y are both valued below their respective means, the expression inside the outer expectation will be positive.

  • The term becomes negative if one value of the variables is above its mean and the other is below.

  • The two random variables will have a positive correlation if this expression is positive on average. The equation can be rewritten as −

Cov(X,Y)=E[XY]−E[Y]E[X]

Using this equation and using the fact that the product of two independent random variables is equal to the multiplication of the expectations, it is easily seen that if two random variables are independent, their covariance is 0.

The reverse is not always true in general − if the covariance value of two random variables is 0, they are not always independent!

So, we can write −

Cov(X,Y)=Cov(Y,X)

Cov(X,X)=E[X2]−E[X]E[X]=Var(X)

Cov(aX+b,Y)=aCov(X,Y)

Correlation between two random variables, given by ρ(X, Y) is the covariance of the two variables that is normalized by the variance of each variable. This normalization removes the units and normalizes the measure so that it is always in the range [0, 1] −

ρ(X,Y)=Cov(X,Y)Var(X)Var(Y)

When ρ(X, Y) = 0, If two variables are independent from each other, then their correlation will be 0.


The Probability Mass Function (PMF) is also called a probability function or frequency function which characterizes the distribution of a discrete random variable. Let X be a discrete random variable of a function, then the probability mass function of a random variable X is given by

Px (x) = P( X=x ), For all x belongs to the range of X

It is noted that the probability function should fall on the condition :

  • Px (x) ≥ 0 and
  • ∑xϵRange(x) Px (x) = 1

Here the Range(X) is a countable set and it can be written as { x1, x2, x3, ….}. This means that the random variable X takes the value x1, x2, x3, ….

These can also be stated as explained below.

The probability mass function P(X = x) = f(x) of a discrete random variable is a function that satisfies the following properties:

  • P(X = x) = f(x) > 0; if x ∈ Range of x that supports
  • ∑������� ����(�)=1
  • �(���)=∑����(�)

Definition

The Probability Mass function is defined on all the values of R, where it takes all the arguments of any real number. It doesn’t belong to the value of X when the argument value equals to zero and when the argument belongs to x, the value of PMF should be positive.

The probability mass function is usually the primary component of defining a discrete probability distribution, but it differs from the probability density function (PDF) where it produces distinct outcomes. This is the reason why probability mass function is used in computer programming and statistical modelling. In other words, probability mass function is a function that relates discrete events to the probabilities associated with those events occurring. The word “mass“ indicates the probabilities that are concentrated on discrete events.

What is the difference between PMF and PDF?

The difference between PMF and PDF:

PMFPDF
Solution ranges between numbers of discrete random variablesThe solution is in a range of continuous random variables
Uses discrete random variablesUses continuous random variables

Also, read:

Related Articles
Probability Density FunctionCumulative Distribution Function
Probability Distribution FormulaBinomial Probability Formula

Applications of Probability Mass Functions

  • Probability mass function plays an important role in statistics. It defines the probabilities for the given discrete random variable. It integrates the variable for the given random number which is equal to the probability for the random variable.
  • It is used to calculate the mean and variance of the discrete distribution.
  • It is used in binomial and Poisson distribution to find the probability value where it uses discrete values.

Some of the probability mass function examples that use binomial and Poisson distribution are as follows :

PMF of Binomial Distribution

In the case of the binomial distribution, the PMF has certain applications, such as:

  • To find the number of successful sales calls
  • To find the number of defective products in the production run
  • Finding the number of head/tails in coin flipping
  • Calculating the number of male and female employees in a company
  • Finding the vote counts for two different candidates in an election

Consider an example that an exam contains 10 multiple choice questions with four possible choices for each question in which the only one is the correct answer. To find the probability of getting correct and incorrect answers, the probability mass function is used.

PMF of Poisson Distribution

Likewise binomial, PMF has its applications for Poisson distribution also.

  • To find the monthly demands for a particular product
  • Calculating the hourly number of customers arriving for a bank
  • Finding the hourly number of accesses to a particular web server
  • Finding the number of typos in a book

Examples with PMF Table

The probability mass function example is given below :

Question : Let X be a random variable, and P(X=x) is the PMF given by,

X01234567
P(X=x)0k2k2k3kk22k27k2+k
  1. Determine the value of k
  2. Find the probability (i) P(X≤ 6), (ii) P(3<x≤ 6 )

Solution :

(1) We know that;
∑P(xi)=1
Therefore,
0 + k + 2k + 2k + 3k + k2 + 2k2 + 7k2+ k = 1
9k + 10k2 = 1
10k2 + 9k – 1 = 0
10k2 + 10k – k -1 = 0
10k(k + 1) -1(k + 1) = 0
(10k – 1) ( k + 1 ) = 0
So, 10k – 1 = 0 and k + 1 = 0
Therefore, k = 1/10 and k = -1
k=-1 is not possible because the probability value ranges from 0 to 1.
Hence, the value of k is 1/10.

(2) (i) P(X ≤ 6) = 1 – P( x > 6)

= 1 – ( 7k2+k )

= 1 – (7(1/10)2 + ( 1/ 10) )

= 1 – (7/100 + 1/10)

= 1 – ( 17/100)

= ( 100 – 17)/100

= 83/100

Therefore , P(X≤ 6) = 83/100

(ii) P(3<x≤ 6 ) = P( x =4) + P ( x = 5 ) + P ( X = 6)

= 3k + k2 + 2k2

= (3/10) + (1/10)2 + 2 (1/10)2

= 3/10 + 1/100 + 2/100

= 3/10 + 3/100

= ( 30+3)/100

= 33/100

P(3<x≤ 6 ) = 33/100.

For more information about probability mass function and other related topics in mathematics, register with BYJU’S – The Learning App and watch interactive videos.

Frequently Asked Questions – FAQs

Q1

What are PDF and PMF?

The probability mass function (PMF) is used to describe discrete probability distributions. In contrast, the probability density function (PDF) is applied to describe continuous probability distributions.
Q2

Are PDF and PMF the same?

No, PDF and PMF are not the same. In terms of random variables, we can define the difference between PDF and PMF. PDF is applicable for continuous random variables, while PMF is applicable for discrete random variables.
Q3

Can you have a probability greater than 1?

No, the probability of any event is less than or equal to 1 but not greater than 1.
Q4

Can PMF be negative?

No, PMF is strictly positive.


T. Distribution


 

T-Distribution vs. Normal Distribution 

Normal distributions are used when the population distribution is assumed to be normal. The t-distribution is similar to the normal distribution, just with fatter tails. Both assume a normally distributed population. T-distributions thus have higher kurtosis than normal distributions. The probability of getting values very far from the mean is larger with a t-distribution than a normal distribution.1

 

Normal vs. t-distribution.

Limitations of Using a T-Distribution 

The t-distribution can skew exactness relative to the normal distribution. Its shortcoming only arises when there’s a need for perfect normality. The t-distribution should only be used when the population standard deviation is not known. If the population standard deviation is known and the sample size is large enough, the normal distribution should be used for better results.

What is the t-distribution in statistics?

The t-distribution is used in statistics to estimate the population parameters for small sample sizes or undetermined variances. It is also referred to as the Student’s t-distribution.

When should the t-distribution be used?

The t-distribution should be used if the population sample size is small and the standard deviation is unknown. If not, then the normal distribution should be used.

What does normal distribution mean?

Normal distribution is a term for a probability bell curve. It is also called the Gaussian distribution.

The Bottom Line

The t-distribution is used in statistics to estimate the significance of population parameters for small sample sizes or unknown variations. Like the normal distribution, it is bell-shaped and symmetric. Unlike normal distributions, it has heavier tails, which result in a greater chance for extreme values.

 

Chi-square test statistics (formula)

Chi-square tests are hypothesis tests with test statistics that follow a chi-square distribution under the null hypothesis. Pearson’s chi-square test was the first chi-square test to be discovered and is the most widely used.

Pearson’s chi-square test statistic is:

Formula

Explanation


Where

  • X² is the chi-square test statistic
  • $\sum$ is the summation operator (it means “take the sum of”)
  • $O$ is the observed frequency
  • $E$ is the expected frequency

If you sample a population many times and calculate Pearson’s chi-square test statistic for each sample, the test statistic will follow a chi-square distribution if the null hypothesis is true.

The shape of chi-square distributions

We can see how the shape of a chi-square distribution changes as the degrees of freedom (k) increase by looking at graphs of the chi-square probability density function. A probability density function is a function that describes a continuous probability distribution.

When k is one or two

When k is one or two, the chi-square distribution is a curve shaped like a backwards “J.” The curve starts out high and then drops off, meaning that there is a high probability that Χ² is close to zero.

When k is greater than two

When k is greater than two, the chi-square distribution is hump-shaped. The curve starts out low, increases, and then decreases again. There is low probability that Χ² is very close to or very far from zero. The most probable value of Χ² is Χ² − 2.

When k is only a bit greater than two, the distribution is much longer on the right side of its peak than its left (i.e., it is strongly right-skewed).

As k increases, the distribution looks more and more similar to a normal distribution. In fact, when k is 90 or greater, a normal distribution is a good approximation of the chi-square distribution.

Properties of chi-square distributions

Chi-square distributions start at zero and continue to infinity. The chi-square distribution starts at zero because it describes the sum of squared random variables, and a squared number can’t be negative.

The mean (μ) of the chi-square distribution is its degrees of freedom, k. Because the chi-square distribution is right-skewed, the mean is greater than the median and mode. The variance of the chi-square distribution is 2k. 

Properties of chi-square distributions

Property

Value

Continuous or discrete

Continuous

Mean

k

Mode

k − 2 (when k > 2)

Variance

2k 

Standard deviation

$\sqrt{2k}$

Range

0 to ∞

The chi-square distribution makes an appearance in many statistical tests and theories. The following are a few of the most common applications of the chi-square distribution.

Pearson’s chi-square test

One of the most common applications of chi-square distributions is Pearson’s chi-square tests. Pearson’s chi-square tests are statistical tests for categorical data. They’re used to determine whether your data are significantly different from what you expected. There are two types of Pearson’s chi-square tests:

Example: Pearson’s chi-square test

A company that sells shirts wants to know if all their shirt colors are equally popular, so they record the number of sales per shirt color for one week.

Number of sales per shirt color

Color

Frequency

Red

30

Gray

29

Yellow

26

Pink

33

Black

56

White

90

Blue

86

Since there were 350 shirt sales in total, 50 sales per color would be exactly equal. It’s obvious that there weren’t exactly 50 sales per color. However, this is just a one-week sample, so we should expect the numbers to be a little unequal just due to chance.

Does the sample give enough evidence to conclude that the frequency of shirt sales truly differs between shirt colors?

A chi-square goodness of fit test can test whether the observed frequencies are significantly different from equal frequencies. By comparing Pearson’s chi-square test statistic to the appropriate chi-square distribution, the company can calculate the probability of these shirt sale values (or more extreme values) happening due to chance.

Population variance inferences

The chi-square distribution can also be used to make inferences about a population’s variance (σ²) or standard deviation (σ). Using the chi-square distribution, you can test the hypothesis that a population variance is equal to a certain value using the test of a single variance or calculate confidence intervals for a population’s variance.

Example: Test of a single variance

A large union wants to ensure that all workers with the same seniority are receiving similar salaries. Their goal is a standard deviation in hourly salary that’s less than $2.

To test whether they’ve achieved their goal, the union randomly selects 30 workers with the same seniority. It finds that the standard deviation of the sample is $1.98. This is very slightly less than $2, but it’s just a sample. Is it enough evidence to conclude that the true standard deviation of all workers with the same seniority is less than $2?

The union can use the test of a single variance to find out whether the standard deviation (σ) is significantly different from $2.

By comparing a chi-square test statistic to the appropriate chi-square distribution, the union can decide whether to reject the null hypothesis.

F distribution definition

Chi-square distributions are important in defining the F distribution, which is used in ANOVAs.

Imagine you take random samples from a chi-square distribution, and then divide the sample by the k of the distribution. Next, you repeat the process with a different chi-square distribution. If you take the ratios of the values from the two distributions, you will have an F distribution.

The non-central chi-square distribution

The non-central chi-square distribution is a more general version of the chi-square distribution. It’s used in some types of power analyses.

The non-central chi-square distribution has an extra parameter called λ (lambda) or the non-central parameter. This parameter changes the shape of the distribution, shifting the peak to the right and increasing the variance as λ increases

 




4 comments:

02

Capstone resource hub

Codingacharya

Capstone Learning Resources, Notes & Project Hub

TCS NQT Questions
Read Notes
Machine Learning – ACE Theory
Read Notes
Machine Learning PPT
Read Notes
MachienLearning LAB
Read Notes
CSPT LAB programs
Read Notes
Time table and CSPT syllabus
Read Notes
Appreciations
Read Notes
ISTE life memberships
Read Notes
Artificial Intelligence & Analytics
Read Notes
Fullstack Web Dev
Read Notes
MERN Web Dev
Read Notes
Course Structure
Read Notes
Cloud Computing
Read Notes
90 Days ML Challenge
Read Notes
Advanced Analytics & Viz
Read Notes
Advanced Machine Learning
Read Notes
React JS
Read Notes
ML Chaitanya
Read Notes
Important Links
Read Notes
CSS Effects
Read Notes
RESUME
Read Notes
Bootstrap CSS
Read Notes
MongoDB
Read Notes
OWN Python Package
Read Notes
HTML Course
Read Notes
HTML Projects
Read Notes
GitHub Projects
Read Notes
Angular JS
Read Notes
Journals
Read Notes
NLP Notes
Read Notes
Videos
Read Notes
Data Analytics & Viz
Read Notes
Cloud Computing (Archive)
Read Notes
Open CV
Read Notes
jQuery
Read Notes
React JS (Archive)
Read Notes
Node JS
Read Notes
DAV Theory
Read Notes
DAV Lab
Read Notes
Big Data Notes
Read Notes
R-Programming
Read Notes
HADOOP Lab
Read Notes
GATE DA
Read Notes
JAVA Lab
Read Notes
Computer Networks
Read Notes
03

Live projects & profiles