Skip to main content

Posts

Showing posts from January, 2021

A two-faced fair coin has its faces designated as head (H) and tail (T). This coin is tossed three times in succession to record the following outcomes: H, H, H. If the coin is tossed one more time, find the probability (up to one decimal place) of obtaining H again, given the previous realizations of H, H and H?

A two-faced fair coin has its faces designated as head (H) and tail (T). This coin is tossed three times in succession to record the following outcomes: H, H, H. If the coin is tossed one more time, find the probability (up to one decimal place) of obtaining H again, given the previous realizations of H, H, and H?  (GATE 2017)  Answer: 0.5  Explanation:  Here, the probability of getting one H is $= \dfrac{1}{2}$.  The probability of getting (H, H, H) is  $= \dfrac{1}{2} \times \dfrac{1}{2} \times \dfrac{1}{2}$  $= \dfrac{1}{16}$  The probability of getting (H, H, H, H) is  $= \dfrac{1}{2} \times \dfrac{1}{2} \times \dfrac{1}{2} \times \dfrac{1}{2}$  $= \dfrac{1}{32}$  Therefore, the required probability is  $= \dfrac{\dfrac{1}{16}}{\dfrac{1}{8}}$  $= \dfrac{1}{2}$  $= 0.5$  Previous Post Next Post

If a random variable $X$ has a Poisson distribution with mean 5, then find the expectation $E[(X + 2)^2]$.

If a random variable $X$ has a Poisson distribution with mean 5, then find the expectation $E[(X + 2)^2]$.  (GATE 2017)  Answer: 54  Explanation:  Here, $X$ is a random variable that follows a Poisson distribution with mean $E(X) = 5$.  Therefore, its variance $Var(X) = 5$.  Now, $Var(X) = E(X^2) - \big\{E(X)\big\}^2$   $\Rightarrow E(X^2) = 5 + 5^2$  $\Rightarrow E(X^2) = 30$  Therefore, $E[(X + 2)^2] $  $= E(X^2 + 4X + 4)$  $= E(X^2) + E(4X) + E(4)$  $= E(X^2) + 4E(X) + 4$  $= 30 + 4 \times 5 + 4$  $= 54$  Previous Post Next Post

For the function $f(x) = a + bx$, $0 \leq x \leq 1$, to be valid probability density function, which one of the following statements is correct?

For the function $f(x) = a + bx$, $0 \leq x \leq 1$, to be valid probability density function, which one of the following statements is correct?  (A) $a = 1$, $b = 4$  (B)  $a = 0.5$, $b = 1$  (C)  $a = 0$, $b = 1$  (D)  $a = 1$, $b = -1$  (GATE 2017)  Answer: ( B)  $a = 0.5$, $b = 1$  Explanation:  For the function $f(x)$ to be a valid probability density function (PDF), the following must hold:  $\int\limits_{0}^{1} f(x) = 1$  $\Rightarrow \int\limits_{0}^{1} (a + bx) = 1$  $\Rightarrow \Big[ax + \dfrac{bx^2}{2}\Big]_{0}^{1} = 1$  $\Rightarrow a + \dfrac{b}{2} = 1$  Only option (B)  $a = 0.5$, $b = 1$ satisfies the above equation.  Previous Post Next Post

Havel-Hakimi Theorem

Havel-Hakimi Theorem In this tutorial, we will learn how to determine if a given degree sequence can form a simple graph using Havel-Hakimi theorem . A graph is said to be a simple graph if it has no self-loop and parallel edges. For a given graph, it is always possible to find its degree sequence, but it may or may not be possible to draw a graph for a given degree sequence.  A degree sequence is called a  graphic sequence  if a simple graph can be drawn with that sequence. For example, the degree sequence <2, 2, 2> is graphic.  Theorem:  The nonincreasing sequence $<d_1, d_2, \ldots, d_n>$ is graphic if and only if the sequence $(d_2-1,d_3-1, \ldots, d_{d_1+1}-1, d_{d_1+2}, d_{d_1+3}, \ldots, d_n)$ is also graphic.  Note: A sequence with all zeroes is always graphic because we can draw that many isolated vertices.  Based on the above theorem, we can use the following algorithm to draw a simple graph from a given degree sequenc...

Address Calculation in an Array

Address Calculation in an Array  This tutorial is written for the GATE aspirants. At first, we discuss how to calculate an address in an array, and then we understand the concepts with some examples.  Arrays can be of two types: one-dimensional and two-dimensional. The address calculation takes different formula for these two types of arrays.  One-dimensional Array Let $A[lb,ub]$ be a one-dimensional array, where $lb$ and $ub$ are the starting and ending indices.  Suppose $b$ represents the base address of the array $A$, and $c$ is the size of each element in $A$.  Now, the address of the $i$-th element in $A$ can be computed using the following formula:  $$Address(A[i]) = b + (i - lb)*c.$$  Two-dimensional Array Let $A[lb_1,ub_1][lb_2,ub_2]$ be a two-dimensional array of order $m \times n$, where $lb_1$ and $ub_1$ are the starting and ending row indices, and  $lb_2$ and $ub_2$ are the starting and ending column indices.  Suppose $b$ rep...