1
Active contributors today

## You toss a coin and roll a number cube. What is P(tails and a six)?

Dayton K.
Featured 8 months ago

$\frac{1}{12}$

#### Explanation:

Since the events are independent,

$P \left(t a i l s \mathmr{and} 6\right) = P \left(t a i l s\right) \cdot P \left(6\right)$

$P \left(t a i l s \mathmr{and} 6\right) = \frac{1}{2} \cdot \frac{1}{6}$

$P \left(t a i l s \mathmr{and} 6\right) = \frac{1}{12}$

## What is the log-likelihood function?

Will
Featured 6 months ago

It is a term used to denote applying the maximum likelihood approach along with a log transformation on the equation to simplify the equation.

#### Explanation:

For example suppose i am given a data set $X \in {R}^{n}$ which is basically a bunch of data points and I wanted to determine what the distribution mean is. I would then consider which is the most likely value based on what I know. If I assume the data comes from the normal distribution $N \left(\mu , {\sigma}^{2}\right)$ with $\mu$ as the mean and ${\sigma}^{2}$ as the variance then we have $f \left(X | \mu , {\sigma}^{2}\right) = {\prod}_{i}^{n} \frac{1}{\sqrt{2 \pi {\sigma}^{2}}} {e}^{- \frac{1}{2 {\sigma}^{2}} {\left({x}_{i} - \mu\right)}^{2}}$.

If $\mu$ is not known then I would try to estimate it by way of maximum likelihood or using the equation I would state

$l \left(\mu | X , {\sigma}^{2}\right) = {\prod}_{i}^{n} \frac{1}{\sqrt{2 \pi {\sigma}^{2}}} {e}^{- \frac{1}{2 {\sigma}^{2}} {\left({x}_{i} - \mu\right)}^{2}}$

Here the equation is the same but the paramter of interest is $\mu$. To solve we take the derivative, set it equal to 0 and solve for $\mu$ so we have.

$\frac{\partial}{\partial \mu} {\prod}_{i}^{n} \frac{1}{\sqrt{2 \pi {\sigma}^{2}}} {e}^{- \frac{1}{2 {\sigma}^{2}} {\left({x}_{i} - \mu\right)}^{2}}$

However before doing so I see that I can apply the natural log before finding the derivative to solve for $x$ and simplify the equation thus ...

$\ln \left(l \left(\mu | X , {\sigma}^{2}\right)\right) = {\sum}_{i}^{n} \ln \left(\frac{1}{\sqrt{2 \pi {\sigma}^{2}}}\right) - \frac{1}{2 {\sigma}^{2}} {\left({x}_{i} - \mu\right)}^{2}$

$\frac{\partial}{\partial \mu} {\sum}_{i}^{n} \ln \left(\frac{1}{\sqrt{2 \pi {\sigma}^{2}}}\right) - \frac{1}{2 {\sigma}^{2}} {\left({x}_{i} - \mu\right)}^{2}$
$= \frac{1}{{\sigma}^{2}} {\sum}_{i}^{n} \left({x}_{i} - \mu\right) = 0$
$= \frac{1}{{\sigma}^{2}} {\sum}_{i}^{n} {x}_{i} = \frac{1}{{\sigma}^{2}} {\sum}_{i}^{n} \mu$
$= {\sum}_{i}^{n} {x}_{i} = n \cdot \mu$
$= \frac{1}{n} {\sum}_{i}^{n} {x}_{i} = \mu$

so an approximation of $\mu$ would be the average of the data or $\overline{x} = \frac{1}{n} {\sum}_{i}^{n} {x}_{i}$.

Using MLE we can also find out what the estimated standard deviation is.

## Find the Probability?

Geoff K.
Featured 2 months ago

We use our good friend Bayes' rule to help us deduce:
$P r \left(\text{took 2 rolls"|"score is 5}\right) = \frac{2}{15.}$

#### Explanation:

One form of Bayes' rule states the following:

$P r \left(B | A\right) = \frac{P r \left(A B\right)}{P r \left(A\right)} = \frac{P r \left(A | B\right) \cdot P r \left(B\right)}{P r \left(A\right)}$

This allows us to write a conditional probability of "B given A" in terms of "A given B", which may be easier to calculate. In this question,

B = "die rolled twice", and
A = "score is 5".

Let's write this into the equation:

#Pr("2 rolls"|"score is 5")=(Pr("score is 5"|"2 rolls")*Pr("2 rolls"))/(Pr("score is 5"))#

The numerator on the RHS is easy to deduce; however, the denominator, in its current state, is not. But we can make it easier. We recall that, if $A$ can be partitioned into $k$ disjoint events $A \cap {C}_{1} , A \cap {C}_{2} , \ldots , A \cap {C}_{k}$ (where none of these intersected regions overlap, and together they all form $A$), then

$P r \left(A\right) = {\sum}_{i = 1}^{k} P r \left(A | {C}_{i}\right) \cdot P r \left({C}_{i}\right)$

We actually have that here; the ${C}_{i}$'s will be the number of possible rolls on a turn. What we're saying is that

$P r \left(\text{score is 5")=Pr("score is 5"|"1 roll")*Pr("1 roll}\right)$
#color(white)"XXXXXXXXX"+Pr("score is 5"|"2 rolls")*Pr("2 rolls")#
#color(white)"XXXXXXXXX"+Pr("score is 5"|"3 rolls")*Pr("3 rolls")#

Kind of a "the whole is equal to the sum of its parts" thing.

From hereon, let's use the shorthand ${S}_{5}$ for "the score was 5" and ${R}_{n}$ for "$n$ number of rolls". Putting this all together, we have

$P r \left({R}_{2} | {S}_{5}\right) = \frac{P r \left({S}_{5} | {R}_{2}\right) P r \left({R}_{2}\right)}{P r \left({S}_{5} | {R}_{1}\right) P r \left({R}_{1}\right) + P r \left({S}_{5} | {R}_{2}\right) P r \left({R}_{2}\right) + P r \left({S}_{5} | {R}_{3}\right) P r \left({R}_{3}\right)}$
$= \frac{P r \left({S}_{5} \cap {R}_{2}\right)}{P r \left({S}_{5} \cap {R}_{1}\right) + P r \left({S}_{5} \cap {R}_{2}\right) + P r \left({S}_{5} \cap {R}_{3}\right)}$

Now, we do the calculations!

$P r \left({S}_{5} \cap {R}_{1}\right) = P r \left(\text{roll a 5}\right)$
$= \frac{1}{6}$
$P r \left({S}_{5} \cap {R}_{2}\right) = P r \left(\text{roll a 2, then a 3}\right) = \frac{1}{6} \cdot \frac{1}{6}$
$= \frac{1}{36}$
$P r \left({S}_{5} \cap {R}_{3}\right) = P r \left[\text{roll a 1; then (1,3), (2,2), or (3,1)}\right] = \frac{1}{6} \cdot \frac{3}{36}$
$= \frac{1}{72}$

Finally, we place these values back into the equation for $P r \left({R}_{2} | {S}_{5}\right) :$

$P r \left({R}_{2} | {S}_{5}\right) = \frac{\frac{1}{36}}{\frac{1}{6} + \frac{1}{36} + \frac{1}{72}} \textcolor{b l u e}{\cdot \frac{72}{72}}$

$\textcolor{w h i t e}{P r \left({R}_{2} | {S}_{5}\right)} = \frac{2}{12 + 2 + 1}$

$\textcolor{w h i t e}{P r \left({R}_{2} | {S}_{5}\right)} = \frac{2}{15}$

For completeness, $P r \left({R}_{1} | {S}_{5}\right) = \frac{12}{15} = \frac{4}{5} ,$ and $P r \left({R}_{3} | {S}_{5}\right) = \frac{1}{15.}$ These three probabilities sum to 1, which is what we'd expect, since if the player's score was 5, it had to take either 1, 2, or 3 rolls.

## Bonus:

There's a great Numberphile video on YouTube discussing Bayes' rule here:

## At In-N-Out, everyone knows that you can order your burgers with or without deee. You an also customize how many burger patties you get the regular (l Patty), double meat (2 patties), or the 3x3 (3 patties). 77% of people order a regular, 16% order double meat, and 54% order cheese. The most popular arger order is a r egular with cheese-42% of all orders! The least popular choice is a 3x3 with no dese, no cheese, making up only 2% of orders.

Parzival S.
Featured 1 month ago

See below:

#### Explanation:

We'll start with burger patties on top. Burgers with cheese will be in $\textcolor{g r e e n}{\text{green}}$ and with no cheese will be in $\textcolor{red}{\text{red}}$

$\textcolor{w h i t e}{0} 1 \textcolor{w h i t e}{00000000000000} 2 \textcolor{w h i t e}{0000000000000} 3 \textcolor{w h i t e}{00000} \text{Burger patties}$

#77%color(white)(0000000000)16%color(white)(00000000000)7%#

$/ \textcolor{w h i t e}{000} \text{\"color(white)(0000000000)"/"color(white)(00)"\"color(white)(0000000000)"/"color(white)(000)"\}$

$\textcolor{w h i t e}{0} | \textcolor{w h i t e}{000000} \text{|"color(white)(00000000)"|"color(white)(00000)"|"color(white)(00000000)"|"color(white)(00000)"|} \textcolor{w h i t e}{00000}$

#color(green)("42%")color(white)(0000)color(red)("35%")color(white)(00000)color(green)("7%")color(white)(000)color(red)("9%")color(white)(000000)color(green)("5%")color(white)(000)color(red)("2%")color(white)(0)"Percentage of orders in total"#

Ok - how to do this:

We know there are 3 types of burger options: 1 patty, 2 patties, 3 patties and these will add to 100%:

#77%+16%+"3 patties"=100%#

#"3 patties"=7%#

We know that #42%# of the orders are 1 patty with cheese. This means that the remaining percentage of single patty burgers are no cheese:

#42%+"1 patty no cheese"=77%#

#"1 patty no cheese"=35%#

We know that #2%# of all orders are the 3 patties no cheese. Which means the remaining amount has cheese:

#2%+"3 patties with cheese"=7%#

#"3 patties with cheese"=5%#

We know that 54% of all orders have cheese. We know the total orders for 1 and 3 patties, so we can solve for 2 patties:

#42%+"2 patties with cheese"+5%=54%#

#"2 patties with cheese"=7%#

And lastly we can figure out the number of 2 patties no cheese:

#7%+"2 patties no cheese"=16%#

#"2 patties no cheese"=9%#

## What is a hypothesis?

Kate M.
Featured 1 week ago

A hypothesis is what informs an experiment or what is being tested/measured. It is often called an educated guess.

#### Explanation:

A hypothesis is what informs an experiment or what is being tested/measured. It is often called an educated guess.

Examples of hypotheses:

• As the number of cigarettes a person smokes per day increases, the risk of lung cancer increases.
• Black cats never get adopted from animal shelters.

A hypothesis can be further broken down into a null hypothesis and an alternative hypothesis. The null hypothesis states that there is no relation and the alternative hypothesis states that there is a relation.

Referring to the first example given above, the null hypothesis would be that there is no relationship between the number of cigarettes a person smokes per day and the risk of lung cancer. The alternative hypothesis is that there is an effect of the number of cigarettes a person smokes per day and the risk of lung cancer OR that the larger the number of cigarettes a person smokes per day, the larger the risk of lung cancer.

A good hypothesis should not only be clear and informative, but it also needs to be measurable.

Hypotheses should be developed after studying the problem or issue as thoroughly as possible, building upon previous knowledge and observations.

## How do you find the mean of the random variable #x#?

Geoff K.
Featured 1 week ago

Mean: $\mu = 1.4$
Variance: ${\sigma}^{2} = 0.64$
Standard deviation: $\sigma = 0.8$

#### Explanation:

We are given that $X$ could take on the values $\left\{0 , 1 , 2 , 3\right\}$ with respective probabilities $\left\{0.15 , 0.35 , 0.45 , 0.05\right\}$. Since $X$ is discrete, we can imagine $X$ as a 4-sided die that's been weighted so that it lands on "0" 15% of the time, "1" 35% of the time, etc.

The question is, when we roll this die once, what value should we expect to get? Or perhaps, if we roll the die a huge number of times, what should the average value of all those rolls be?

Well, of the 100% of the rolls, 15% should be "0", 35% should be "1", 45% should be "2", and 5% should be "3". If we add all these together, we'll have what's known as a weighted average.

In fact, if we placed these relative weights at their matching points on a number line, the point that would "balance the scale" is the mean that we seek.

This is a good way to interpret the mean of a discrete random variable. Mathematically, the mean $\mu$ is the sum of all the possible values, weighted by their probabilities. As a formula, this is:

$\mu = E \left[X\right] = {\sum}_{\text{all } x} \left[x \cdot P \left(X = x\right)\right]$

In our case, this works out to be:

$\mu = \left[0 \cdot P \left(0\right)\right] + \left[1 \cdot P \left(1\right)\right] + \left[2 \cdot P \left(2\right)\right] + \left[3 \cdot P \left(3\right)\right]$
$\textcolor{w h i t e}{\mu} = \left(0\right) \left(0.15\right) + \left(1\right) \left(0.35\right) + \left(2\right) \left(0.45\right) + \left(3\right) \left(0.05\right)$
$\textcolor{w h i t e}{\mu} = \text{ "0" "+" "0.35" "+" "0.9" "+" } 0.15$
$\textcolor{w h i t e}{\mu} = 1.4$

So, over a large number of rolls, we would expect the average roll value to be $\mu = 1.4$.

The variance is a measure of the "spread" of $X$. Going back to our "balanced number line" idea, if we moved our weights out from our "centre of gravity" $\mu$ so that they are twice as far away, $\mu$ itself wouldn't change, but the variance would increase, by a factor of 4.

That's because the variance ${\sigma}^{2}$ of a random variable is the average squared distance between each possible value and $\mu$. (We square the distances so that they're all positive.) As a formula, this is:

${\sigma}^{2} = \text{Var} \left(X\right) = E \left[{\left(X - \mu\right)}^{2}\right]$

Using a bit of algebra and probability theory, this becomes

${\sigma}^{2} = E \left[{X}^{2}\right] - {\mu}^{2}$
#color(white)(sigma^2)=sum_("all x")x^2P(X=x)" "-" "mu^2#

For this problem, we get

${\sigma}^{2} = \left[{0}^{2} \cdot P \left(0\right)\right] + \left[{1}^{2} \cdot P \left(1\right)\right] + \left[{2}^{2} \cdot P \left(2\right)\right]$
$\textcolor{w h i t e}{{\sigma}^{2} =} + \left[{3}^{2} \cdot P \left(3\right)\right] \text{ "-" } {1.4}^{2}$
$\textcolor{w h i t e}{{\sigma}^{2}} = \left(0\right) \left(0.15\right) + \left(1\right) \left(0.35\right) + \left(4\right) \left(0.45\right) + \left(9\right) \left(0.05\right)$
$\textcolor{w h i t e}{{\sigma}^{2} =} - 1.96$
$\textcolor{w h i t e}{{\sigma}^{2}} = 0.64$

So the average squared distance between each possible $X$ value and $\mu$ is ${\sigma}^{2} = 0.64$.

Standard deviation is easy—it's just the square root of the variance. But, why bother with it if it's pretty much the same? Because the units of ${\sigma}^{2}$ are the square of the units of $X$. If $X$ measures time, for example, its variance is in units of ${\text{(time)}}^{2}$, which really doesn't help us if we're trying to establish a "margin of error".

That's where standard deviation comes in. The standard deviation $\sigma$ of $X$ is a measure of how far from $\mu$ we should expect $X$ to be. It's simply

$\sigma = \sqrt{{\sigma}^{2}}$

For this problem, that works out to be

$\sigma = \sqrt{0.64} = 0.8$

So every time we pick an $X$, the expected distance between $\mu$ and that $X$ is $\sigma = 0.8$. And since $\sigma$ is in the same "units" as $X$, it's much more easy to use to help us construct a margin of error. (See: confidence intervals.)

##### Questions
Ask a question Filters
• 23 minutes ago · in Analysis of Variance
• An hour ago · in Boxplots
• · 4 hours ago
• 4 hours ago · in One-sample t test
• 5 hours ago
• 5 hours ago · in Two-Way Tables
• 5 hours ago · in Boxplots
• · 7 hours ago · in Two-Way Tables
This filter has no results, see all questions.
×
##### Question type

Use these controls to find questions to answer