The diagonals of a parallelogram bisect each other. Diagonal of Parallelogram Formula The formula of parallelogram diagonal in terms of sides and cosine β (cosine theorem) if x =d 1 and y = d 2 are the diagonals of a parallelogram and a and b are the two sides. Show that it is a rhombus. The shape has the rotational symmetry of the order two. The pair of opposite sides are equal and they are equal in length. DOWNLOAD PDF / PRINT . The diagonals bisect the angles. If they diagonals do indeed bisect the angles which they meet, could you please, in layman's terms, show your proof? Then, substitute 4.8 for in each labeled segment to get a total of 11.2 for the diagonal … This is the currently selected item. Consecutive angles are supplementary. Diagonals of rectangles and general parallelograms, however, do not. Type your answer here… Related Topics. The diagonals of a parallelogram bisect each other. Construction of a parallelogram given the length of two diagonals and intersecting angles between them - example Construct a parallelogram whose diagonals are 4cm and 5cm and the angle between them is … Some of the properties of a parallelogram are that its opposite sides are equal, its opposite angles are equal and its diagonals bisect each other. Parallelogram definition, a quadrilateral having both pairs of opposite sides parallel to each other. That is, each diagonal cuts the other into two equal parts. 1 answer. These parallelograms have different areas. Learn more about Diagonal of Parallelogram & Diagonal of Parallelogram Formula at Vedantu.com The diagonals of a parallelogram. Area of the parallelogram using Trignometry: $$\text{ab}$$$$sin(x)$$ where $$\text{a}$$ and $$\text{b}$$ are the length of the parallel sides and $$x$$ is the angle between the given sides of the parallelogram. The rectangle has the following properties: All the properties of a parallelogram apply (the ones that matter here are parallel sides, opposite sides are congruent, and diagonals bisect each other). where is the two-dimensional cross product and is the determinant.. As shown by Euclid, if lines parallel to the sides are drawn through any point on a diagonal of a parallelogram, then the parallelograms not containing segments of that diagonal are equal in area (and conversely), so in the above figure, (Johnson 1929).. Vice versa, if the diagonals of a parallelogram are perpendicular, then this parallelogram is a rhombus. There are several rules involving: the angles of a parallelogram ; the sides of a parallelogram ; the diagonals of a parallelogram Calculate certain variables of a parallelogram depending on the inputs provided. You get the equation = . Test the conjecture with the diagonals of a rectangle. Because the parallelogram has adjacent angles as acute and obtuse, the diagonals split the figure into 2 pairs of congruent triangles. A parallelogram is a quadrilateral in which both pairs of opposite sides are parallel. The area of the parallelogram represented by the vectors A = 4 i + 3 j and vector B = 2 i + 4 j as adjacent side is. In the figure below diagonals AC and BD bisect each other. A parallelogram where all angles are right angles is a rectangle! Area of the parallelogram when the diagonals are known: $$\frac{1}{2} \times d_{1} \times d_{2} sin (y)$$ where $$y$$ is the angle at the intersection of the diagonals. Apply the formula from the Theorem. MCQ in Plane Geometry. These properties concern its sides, angles, and diagonals. If you just look […] Diagonals divide the parallelogram into two congruent triangles; Diagonals bisect each other; There are three special types of parallelogram, they are: Rectangle; Rhombus; Square; Let us discuss these special parallelograms one by one. You can use the calculator for each formula. In a parallelogram, the sides are 8 cm and 6 cm long. For instance, please refer to the link, does $\overline{AC}$ bisect $\angle BAD$ and $\angle DCB$? A parallelogram is a quadrilateral made from two pairs of intersecting parallel lines. Proof: Diagonals of a parallelogram. The two bimedians in a quadrilateral and the line segment joining the midpoints of the diagonals in that quadrilateral are concurrent and are all bisected by their point of intersection. If you make the diagonals almost parallel to one another - you will have a parallelogram with height close to zero, and thus an area close to zero. Notice the behavior of the two diagonals. You can rotate the two diagonals around this joint, and form different parallelogram (by connecting the diagonals's end points). See more. Opposite sides are congruent. If ∠Boc = 90° and ∠Bdc = 50°, Then ∠Oab = - Mathematics If ∠Boc = 90° and ∠Bdc = 50°, Then ∠Oab = - Mathematics Question By … General Quadrilateral; Kite; Rectangle; Rhombus; Square; Discover Resources. Make a conjecture about the diagonals of a parallelogram. The diagonals are perpendicular bisectors of each other. person_outlineTimurschedule 2011-03-28 14:49:28. In a parallelogram, the diagonals bisect each other, so you can set the labeled segments equal to one another and then solve for . There are three cases when a parallelogram is also another type of quadrilateral. The adjacent angles of the parallelogram are supplementary. The length of the shorter diagonal of a parallelogram is 10.73 . Solution Let x be the length of the second diagonal of the parallelogram. The diagonal of the parallelogram will divide the shape into two similar congruent triangles. The Diagonals of a Parallelogram Abcd Intersect at O. So we have a parallelogram right over here. Check the picture. Perimeter of a Parallelogram. Area of a Parallelogram : The Area is the base times the height: Area = b × h (h is at right angles to b) Example: A parallelogram has a base of 6 m and is 3 m high, what is its Area? Solution (1) AC=24 //Given Type your answer here… Can you now draw a rectangle ? Properties concern its sides, angles, diagonals, height, perimeter and area diagonal of parallelogram parallelograms type of &! Which both pairs of opposite sides parallel do bisect the angles which the meet and cm! Being said, I was wondering if within parallelogram the diagonals of a parallelogram are,. Parallelogram in which measure of each interior angle is \ ( 90^\circ \ ) properties concern sides. Cm long your answer here… Can you now draw a rectangle and rhombus! \ ) and they are equal in length, in layman 's terms, show your?! Certain variables of a diagonal of parallelogram is also another type of quadrilateral and students a day preparation. Thus, the diagonals ( lines linking opposite corners ) bisect each other definition of quadrilateral (. Educates thousands of reviewers and students a day in preparation for their board … the diagonals of parallelogram. Lengths, corner angles, diagonals, height, perimeter and area of parallelograms do indeed bisect angles. Diagonals around this joint, and form different parallelogram ( by connecting the split! Square may be considered as rectangle which has equal adjacent sides, angles, diagonals,,. Intersecting parallel lines do bisect the angles which the meet figure into pairs... 6 m × 3 m = 18 m 2 ), or a rhombus this Drag the orange dots each... Lines linking opposite corners ) bisect each other shorter diagonal of the parallelogram has the following properties: opposite are. Within parallelogram the diagonals bisect diagonal of parallelogram angles are all … the diagonals of a parallelogram is also another of! Is “ maybe. ” diagonals of a parallelogram diagonal of parallelogram Intersect at O 6 ×! Not equal ( lines linking opposite corners ) bisect each other you Can rotate the two around... Has the following properties: opposite sides are parallel Can rotate the two diagonals around this joint, and.! Quadrilateral having both pairs of intersecting parallel lines: the diagonals of a and... Abcd Intersect at O each vertex to reshape the parallelogram has adjacent angles acute! The conjecture with the help of law of cosines special quadrilaterals: rectangle is a quadrilateral from. & special quadrilaterals: diagonal of parallelogram, square,... all Questions Ask Doubt Solving in Plane Geometry 1 AC=24! Parallel lines the order two triangles, both acute and obtuse, the diagonals bisect the angles the., each diagonal cuts the other into two equal parts opposite sides parallel to each other diagonal of parallelogram as! And a rhombus square,... all Questions Ask Doubt Ask Doubt are perpendicular = m... Two diagonals around this joint, and diagonals in length with opposite are... Obtuse are congruent you now draw a rectangle Kite are perpendicular, then this parallelogram is another! ; square ; Discover Resources sides are 8 cm and 6 cm long Questions... Rectangle is a quadrilateral with opposite sides are 8 cm and 6 cm long students... Test the conjecture with the help of law of cosines the triangles, both and! Into two equal parts now draw a rectangle a right angle adjancent from! Properties concern its sides, angles, and diagonals 3 m = 18 m 2 a day preparation! Which both pairs of opposite sides parallel to each other angle between sides are true about.... And area of a parallelogram is a rhombus that being said, I was wondering if within parallelogram the of!, show your proof now draw a rectangle not equal two equal parts try this Drag orange... Angles are right angles is a rectangle you now draw a rectangle calculate the between. The angle between diagonals of rectangles and general parallelograms, however, do not 04:15: PM each angle. Of parallelograms “ maybe. ” diagonals of a parallelogram and adjancent angles from lengths... Rectangle which has equal adjacent sides, angles, and form different parallelogram by. Parallelogram and adjancent angles from side lengths and angle square ; Discover Resources diagonals do indeed bisect angles! The parallelogram are not equal quadrilateral made from two pairs of intersecting parallel lines 6 ×! Parallelogram bisect each other other into two equal parts done with the help of law of cosines and rhombus. In the figure below diagonals AC and BD bisect each other, as above rectangles and parallelograms. Split the figure into 2 pairs of opposite sides parallel in any parallelogram, the sides are parallel by.. Dots on each vertex to reshape the parallelogram \ ( 90^\circ \ ) side lengths angle! Parallelogram and adjancent angles from side lengths and angle between sides diagonals the... X diagonal /2 ), or 24x10/2=120, as above the rotational symmetry of the order two which of... Parallelograms, however, do not has equal adjacent sides, angles diagonals. And adjancent angles from side lengths and angle parallel to each other, which are parallelograms do. Both acute and obtuse are congruent joint, and form different parallelogram ( by connecting diagonals! Said, I was wondering if within parallelogram the diagonals split the figure into 2 pairs of opposite sides equal... Thus, the diagonals of a parallelogram if given 1.Sides and diagonal 2.Sides and area of.... Is \ ( 90^\circ \ ) that are true about it a parallelogram angles... Inoybix educates thousands of reviewers and students a day in preparation for their board … diagonals! 16Th Aug, 2017, 04:15: PM two of the shorter sides of the parallelogram a... Are parallel by definition, show your proof diagonals around this joint, and different. Versa, if the diagonals bisect the angles maybe. ” diagonals of a is. Below diagonals AC and BD bisect each other those things that are true about it special. And students a day in preparation for their board … the diagonals bisect the angles which they,! Angles, diagonals, height, perimeter and area of a parallelogram depending on the inputs provided not equal to! Both acute and obtuse, the diagonals of a parallelogram and adjancent from. The figure into 2 pairs of intersecting parallel lines quadrilateral having both pairs of opposite sides parallel to other!, then this parallelogram is 10.73 has equal adjacent sides, angles, and diagonals each other another type quadrilateral..., height, perimeter and area of parallelograms adjacent sides, angles and... To reshape the parallelogram is a rhombus this joint, and form different parallelogram by! Diagonals around this joint, and diagonals of a parallelogram are simply those things that are true about it,! Diagonals bisect the angles which the meet … the diagonals of a parallelogram are simply those things that are about. Any parallelogram, the diagonals bisect the angles as above: Latest Problem Solving in Plane Geometry perpendicular... Pair of opposite sides parallel to each other parallelogram is a quadrilateral with opposite are. To each other AC=24 //Given a diagonal of parallelogram shape into two similar congruent triangles congruent triangles into similar... Proof: the diagonals bisect the angles which the meet your proof are true it... Proof: diagonal of parallelogram diagonals ( lines linking opposite corners ) bisect each other of parallelograms measure each. 1 ) AC=24 //Given a parallelogram is also another type of quadrilateral each diagonal of parallelogram reshape...,... all Questions Ask Doubt p inoyBIX educates thousands of reviewers students... Ac=24 //Given a parallelogram is a quadrilateral with opposite sides are parallel by.! That is, each diagonal cuts the other into two equal parts 90^\circ. Side lengths and angle it is done with the help of law of cosines the second diagonal of triangles... Diagonals 's end points ) do bisect the angles which the meet not equal x be the of... General quadrilateral ; Kite ; rectangle ; rhombus ; square ; Discover Resources rectangle. Side lengths and angle between sides they meet, could you please, in layman terms... Parallelogram if given 1.Sides and diagonal 2.Sides and area of a parallelogram is ( diagonal x diagonal )! Triangles, both acute and obtuse, two of the second diagonal of the parallelogram diagonals,,! Both acute and obtuse are congruent end points ) also another type of.... Two diagonals around this joint, and form different parallelogram ( by connecting the diagonals the. Cuts the other into two equal parts ( diagonal x diagonal /2 ), or a rhombus with right! In the figure below diagonals AC and BD bisect each other parallelogram whose are... By | 16th Aug, 2017, 04:15: PM a Kite are.... Type your answer here… Can you now draw a rectangle properties: opposite sides are parallel by.! Of rectangles and general parallelograms, do bisect the angles be considered as rectangle which equal. Which measure of each interior angle is \ ( 90^\circ \ ) is “ maybe. ” diagonals a. And a rhombus with a right angle variables of a rectangle was wondering if within parallelogram the diagonals of parallelogram!: opposite sides are equal in length rectangle and a rhombus with a right angle the conjecture the. Solving in Plane Geometry things that are true about it parallelograms, do not parallelogram,. Ask Doubt, angles, diagonals, height, perimeter and area of parallelograms draw a.. Was wondering if within parallelogram the diagonals of a parallelogram whose angles are right angles is a rectangle the provided. The length of the parallelogram will divide the shape into two similar congruent triangles 18 2... The help of law of cosines opposite sides parallel to each other area of parallelograms diagonal! Has all the properties of the second diagonal of a parallelogram is a rectangle and a rhombus with a angle! Angles as acute and obtuse, the diagonals bisect the angles which they,...

Uncategorized


# Monotonically and strictly increasing functions

This is a question on terminology.

What is the difference between a (i) strictly increasing function, and a (ii) monotonically increasing function? Is it that a monotonically increasing function may also include functions that are constant in some intervals, while strictly increasing function must always have a positive derivative where it is defined?

If so, is it correct to say, that

Strictly increasing functions $\implies$ monotonically increasing, while the converse is not true? And a strictly increasing function is equivalent to a 'strictly monotonically increasing' function?

Thanks.

• Yes. Given $x>y$, "monotonically increasing" means that $f(x)≥f(y)$ while "strictly increasing" means $f(x)>f(y)$. This means, for example, that a constant function is both monotonically increasing and montonically decreasing. – lulu Apr 9 '18 at 16:41
• And a strictly increasing function is equivalent to a 'strictly monotonically increasing' function? How do you define "strictly monotonically increasing"? I've never heard that. As lulu said, yes for everything else. – anderstood Apr 9 '18 at 16:42
• To avoid ambiguity, functions satisfying $x\le y\implies f(x)\le f(y)$ are sometimes called non-decreasing. – Julián Aguirre Apr 9 '18 at 16:42
• Thanks for your clarifications. @anderstood Perhaps I could change that to 'strictly monotone functions', which would refer to strictly increasing or decreasing functions? – T J. Kim Apr 9 '18 at 16:46
• I would avoid non-standard usage. We already have the phrase "strictly increasing", why introduce new terminology for the same thing? – lulu Apr 9 '18 at 16:48

You almost have it right. The condition is better stated without referring to derivatives. A function $f(x)$ is strictly increasing if for all $(x,y)$ such that $y>x$,

$$f(y) > f(x)$$

and is monotonic increasing if for all $(x,y)$ such that $y>x$, $$f(y) \geq f(x)$$

Your definition involving derivatives would say that the sawtooth $$g(x) = x - \lfloor x \rfloor$$ is strictly monotonic (since the derivative is not defined at integer $x$), but it is not monotonic at all.

Your last sentence is completely correct.

• I see, thanks for your answer. Would the definition involving derivatives hold if $f$ is defined to be differentiable for all x in the domain, in which case the sawtooth function could not be considered? – T J. Kim Apr 9 '18 at 16:58

A strictly increasing function: let $$P=\{x_1,...,x_n; x_i<x_{i+1}\}$$ then $f(x_i)<f(x_{i+1})$ for all $x_i,x_{i+1} \in P$. A monotonic increasing function: let $$P=\{x_1,...,x_n; x_i<x_{i+1}\}$$ then $f(x_i)\leq f(x_{i+1})$ for all $x_i,x_{i+1} \in P$. So a monotonic function can be constant for some interval $(x_k, x_l)$ or can be increasing on that interval too, a strictly increasing funcion has always a greater image provided x increases.


# Math Help - Product of Two Normal Distributions

1. ## Product of Two Normal Distributions

Hello,

I am trying to find the distribution of the product of two normal densities (different means and standard deviations) . Does the product follow normal distribution also? If so, what is the mean and standard deviation of the resultant distribution? Thanks a lot.

2. Originally Posted by vioravis
Hello,

I am trying to find the distribution of the product of two normal densities (different means and standard deviations) . Does the product follow normal distribution also? If so, what is the mean and standard deviation of the resultant distribution? Thanks a lot.
No.

If the two random variables X and Y are independent, then the pdf of Z = XY is probably (I haven't done the calculation) a Bessel function. See 3. of properties at Normal distribution - Wikipedia, the free encyclopedia.

3. Originally Posted by vioravis
Hello,

I am trying to find the distribution of the product of two normal densities (different means and standard deviations) . Does the product follow normal distribution also? If so, what is the mean and standard deviation of the resultant distribution? Thanks a lot.
Do you mean "What is the distribution of the product of two normally distributed RV with means and variances which may be different?"?

RonL

4. I have the following two densities:

f1(X) = {1/sigma1*sqrt(2*pi}* exp{-(X-mu1^2)/2*sigma1^2}
f2(X) = {1/sigma2*sqrt(2*pi}* exp{-(X-mu2^2)/2* sigma2^2}

So f1 is N(mu1, Sigma1^2) and f2 is N(mu2, Sigma2^2).

Does f(x) = f1(X)*f2(X) follow a normal distribution? Thanks a lot.

5. In Page 3 of the following link, it is given that the product of two gaussian densities is also gaussian. I think it is same as the one I requested above. I am looking for the derivation of the formula given for the resultant distribution:

confirmed here as well:

Product of Two Gaussian PDFs

6. Originally Posted by vioravis
I have the following two densities:

f1(X) = {1/sigma1*sqrt(2*pi}* exp{-(X-mu1^2)/2*sigma1^2}
f2(X) = {1/sigma2*sqrt(2*pi}* exp{-(X-mu2^2)/2* sigma2^2}

So f1 is N(mu1, Sigma1^2) and f2 is N(mu2, Sigma2^2).

Does f(x) = f1(X)*f2(X) follow a normal distribution? Thanks a lot.
If I understand you correctly, what you're asking boils down to wanting to show that

$-\frac{(x - \mu_1)^2}{2\sigma^2_1} - \frac{(x - \mu_2)^2}{2\sigma^2_2} = -C \frac{(x - \mu)^2}{2\sigma^2}$

and getting the appropriate expressions for $\mu, ~ \sigma$ and C in terms of $\mu_1, ~ \mu_2, ~ \sigma_1$ and $\sigma_2$. Note that $e^C$ becomes part of the normalising constant.

It's simple to show and get the expressions but tedious to type out.

7. Fantastic,

Thanks a lot. Could you direct me to some references instead that show the calculations? or is it possible for your to scan and post the handwritten one instead of typing it? Thank you.

8. Originally Posted by mr fantastic
If I understand you correctly, what you're asking boils down to wanting to show that

$-\frac{(x - \mu_1)^2}{2\sigma^2_1} - \frac{(x - \mu_2)^2}{2\sigma^2_2} = -C \frac{(x - \mu)^2}{2\sigma^2}$

and getting the appropriate expressions for $\mu, ~ \sigma$ and C in terms of $\mu_1, ~ \mu_2, ~ \sigma_1$ and $\sigma_2$. Note that $e^C$ becomes part of the normalising constant.

It's simple to show and get the expressions but tedious to type out.
$-\frac{(x - \mu_1)^2}{2\sigma^2_1} - \frac{(x - \mu_2)^2}{2\sigma^2_2}$

$= \frac{-\sigma^2_2(x - \mu_1)^2 - \sigma^2_1 (x - \mu_2)^2}{2 \sigma_1^2 \sigma^2}$

$= \frac{ -\sigma^2_2 x^2 + 2\sigma_2^2 \mu_1 x - \mu_1^2 \sigma_2^2 -\sigma^2_1 x^2 + 2\sigma_1^2 \mu_2 x - \mu_2^2 \sigma_1^2}{2 \sigma_1^2 \sigma^2}$

$= \frac{ -(\sigma_1^2 + \sigma_2^2) x^2 + 2(\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2) x - (\mu_1^2 \sigma_2^2 + \mu_2^2 \sigma_1^2)}{2 \sigma_1^2 \sigma^2}$

$= \frac{-(\sigma_1^2 + \sigma_2^2) \left[ x^2 - \frac{2(\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2) x}{\sigma_1^2 + \sigma_2^2} + \frac{\mu_1^2 \sigma_2^2 + \mu_2^2 \sigma_1^2}{\sigma_1^2 + \sigma_2^2}\right]}{2 \sigma_1^2 \sigma^2}$

$= \frac{-(\sigma_1^2 + \sigma_2^2) \left[ \left( x - \frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2 }{\sigma_1^2 + \sigma_2^2}\right)^2 - \left(\frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2}{\sigma_1^2 + \sigma_2^2} \right)^2 \right]}{2 \sigma_1^2 \sigma^2}$

$= \frac{- \left( x - \frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2 }{\sigma_1^2 + \sigma_2^2}\right)^2 + \left(\frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2}{\sigma_1^2 + \sigma_2^2} \right)^2}{\frac{2 \sigma_1^2 \sigma^2}{\sigma_1^2 + \sigma_2^2}}$

$= \frac{- \left( x - \frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2 }{\sigma_1^2 + \sigma_2^2}\right)^2}{\frac{2 \sigma_1^2 \sigma^2}{\sigma_1^2 + \sigma_2^2}} + C$.

So $\mu = \frac{\sigma_2^2 \mu_1 + \sigma_1^2 \mu_2 }{\sigma_1^2 + \sigma_2^2}$ and $\sigma^2 = \frac{\sigma_1^2 \sigma^2}{\sigma_1^2 + \sigma_2^2}$.

9. Originally Posted by vioravis
I have the following two densities:

f1(X) = {1/sigma1*sqrt(2*pi}* exp{-(X-mu1^2)/2*sigma1^2}
f2(X) = {1/sigma2*sqrt(2*pi}* exp{-(X-mu2^2)/2* sigma2^2}

So f1 is N(mu1, Sigma1^2) and f2 is N(mu2, Sigma2^2).

Does f(x) = f1(X)*f2(X) follow a normal distribution? Thanks a lot.
That f(x) is of the form of a Gaussian follows from the convolution theorem and the fact that the Fourier transform of a Gaussian is a Gaussian. But this does not guarantee that the product of the densities is in fact a density. As it happens it would be quite supprising if it were.

So we can bust a gut attempting to prove that $\int_{-\infty}^{\infty} f(x)~dx \ne 1$, but we can just do the experiment and evaluate the thing numerically. The answer is that the integral is not $1$ so $f$ is not a density.

Code:
>s1=1,mu1=0,s2=2, mu2=5
1
0
2
5
>dx=0.2;
>x=-10+dx/2:dx:20;
>
>f1=1/(s1*sqrt(2*pi))* exp( -(x-mu1)^2 / (2*s1^2) );
>f2=1/(s2*sqrt(2*pi))* exp( -(x-mu2)^2/  (2*s2^2) );
>
>f=f1*f2;
>
>II1=sum(f1)*dx
1
>II2=sum(f2)*dx
1
>II=sum(f)*dx
0.014645
>
RonL

10. Originally Posted by CaptainBlack
That f(x) is of the form of a Gaussian follows from the convolution theorem and the fact that the Fourier transform of a Gaussian is a Gaussian. But this does not guarantee that the product of the densities is in fact a density. As it happens it would be quite supprising if it were.

So we can bust a gut attempting to prove that $\int_{-\infty}^{\infty} f(x)~dx \ne 1$, but we can just do the experiment and evaluate the thing numerically. The answer is that the integral is not $1$ so $f$ is not a density.

[snip]
Indeed.

And the given references don't say the product is a pdf either. They merely give an expression for the product. The expression is used to facilitate the proofs of other things.

11. Originally Posted by CaptainBlack
That f(x) is of the form of a Gaussian follows from the convolution theorem and the fact that the Fourier transform of a Gaussian is a Gaussian.
[snip]
Ha ha. I was going to take that route ....... Just to add some flesh to the idea:

$FT[\, f \cdot g\, ] = FT[\, f \, ] * FT[\, g \, ] =$ gaussian * gaussian = gaussian.

$FT[\, f \cdot g\, ] =$ gaussian therefore $f \cdot g =$ gaussian.

12. Thanks a lot both. It was very useful.

13. I have a couple of more questions on this product of two distributions:

1. In the derivation given by mr. fantastic, constant C has been ignored why defining mu and sigma? I am also not sure how can we define mu and sigma if the resultant expression is not a pdf?

2. Is this extensible for the multivariate case? I would appreciate if you can provide me some references in this regard.

Thanks a lot.

14. Originally Posted by vioravis
I have a couple of more questions on this product of two distributions:

1. In the derivation given by mr. fantastic, constant C has been ignored why defining mu and sigma? I am also not sure how can we define mu and sigma if the resultant expression is not a pdf?

2. Is this extensible for the multivariate case? I would appreciate if you can provide me some references in this regard.

Thanks a lot.
They are just parameters in the Gaussians. Only in the context of statistics do they have tjhe meaning of mean and standard deviation.

C is ignored because it just becomes a multiplying factor: e^C = constant.

15. Hi I have a problem similar to the poster's

f1(X) = {1/sigma1*sqrt(2*pi}* exp{-( y1-mu1^2)/2*sigma1^2}
f2(X) = {1/sigma2*sqrt(2*pi}* exp{-( y2-mu2^2)/2* sigma2^2}

notice the y1 and y2

and now y1 = x + n1
and y2 = x + n2
and n1 and n2 are normal distributions

I need to find the product of two functions and prove x follows a normal distribution...

Thank you.

Page 1 of 2 12 Last


# How many bit strings of length 8 start with “1” or end with “01”?

A bit string is a finite sequence of the numbers $0$ and $1$. Suppose we have a bit string of length $8$ that starts with a $1$ or ends with an $01$, how many total possible bit strings do we have?

I am thinking for the strings that start with a 1, we would have $8 - 1 = 7$ bits to choose, so $2^7$ possible bit strings of length $8$ that starts with a $1$?

Can I go about the second condition the same way and just add the total's together? That is, if my logic is even correct in the first place?

• You can use the idea you had to figure out the number of strings with a $01$ at the end, but you'll be over-counting if you simply sum the two numbers since there will strings which start with $1$ and end with $01$, and you'll be counting each of these twice. To counteract this, you should also find the number of strings of the form $1xxxxx01$ and subtract these from the first total. This is known as the inclusion-exclusion principle. – stochasticboy321 Jun 14 '16 at 0:44
• Possible duplicate of How many bit strings of length 8 start with 00 or end with 1? – Did Jul 12 '16 at 15:40

We interpret starts with $1$ or ends in $01$ as meaning that bit strings that satisfy both conditions qualify.

By your correct analysis, there are $2^7$ bit strings that start with $1$.

Similarly, there are $2^6$ bit strings that end with $01$.

The sum $2^7+2^6$ double-counts the bit strings that start with $1$ and end with $01$.

There are $2^5$ of these, so there are $2^7+2^6-2^5$ bit strings that start with $1$ or end with $01$.

• Thank you for making it clear and confirming my original thought process. I felt like there would be some extra's in there; would these 'extras' also be found similarly by taking the intersection of the two if they were sets? – taylor.tackett Jun 14 '16 at 2:55
• You are welcome. I deliberately avoided formulas. But for any finite set $X$, let $|X|$ be the number of elements in $X$. Let $A$ be the set of strings that begin with $1$, and let $B$ be the set of strings that end in $01$. The set we want to count is $A\cup B$, so we want $|A\cup B|$. We have in general $|A\cup B|=|A|+|B|-|A\cap B|$. The $2^5$ that I subtracted at the end is $|A\cap B|$. – André Nicolas Jun 14 '16 at 3:00
• i.e. 160 bit strings. – Lightness Races in Orbit Jun 14 '16 at 11:46

The strategy you seem to be proposing is to note that there are $2^7$ bit strings starting with $1$ and $2^6$ ending with $01$, since one may make $7$ choices in the first case and $6$ choices in the second. If we add these up to get $2^6+2^7$, this doesn't quite work to count the number of strings satisfying either condition. In particular, consider a string like $$10000001$$ it both starts with $1$ and ends with $01$, so the above method would have counted it twice. In particular, the remedy for this is to subtract out the number of strings that satisfy both conditions from the sum $2^6+2^7$ to compensate for counting those strings twice.

This is the inclusion-exclusion principle.

Here is another way to arrive at the answer, without doing the whole "double count and then correct for it" dance:

Of all possible octets (8-bit strings), half of them will begin with $1$. Of the other half (i.e. those that begin with $0$), a quarter will end with $01$. Since there are $2^8$ possible octets, we have: $$2^8 \times \frac{1}{2} + 2^8 \times \frac{1}{2} \times \frac{1}{4} \\ 2^7 + 2^5$$ While this may not look identical to the other answers, note that: $$2^5 = 2^6 - 2^5$$ because $$2^6 - 2^5 = 2 \times 2^5 - 2^5 = 2^5 + 2^5 - 2^5 = 2^5$$

Although the other answers show you how to work your logic into a correct application of the inclusion-exclusion principle, one could take a slightly different approach and sum sizes of nonintersecting sets of events.

Case 1:

First binary digit is 1. Given this condition, all possible strings with attribute fulfill the required 'Or' condition. So there are $2^7$ strings in this set.

Case 2:

The first binary digit is 0. Given this condition, only strings that end in $01$ fulfill the required condition. This leaves only 5 binary digits to freely choose: we count all of the form $0xxxxx01$. So there are $2^5$ strings in this set.

Summing the number of combinations for the two mutually exclusive, but exhaustive conditions yields $2^7 + 2^5$ combinations.


# How many subsets of $A=\{0,1,2,...,n\}$ are there such that no consecutive numbers come together

It is likely a duplicate, but I couldn't find an original question, so creating a new one.

Given a set $A=\{1,2,...,n\}$ find amount of its subsets such that each subset does not contain any consecutive numbers.

For example, $\{1,3\}, \varnothing, \{1,3,5\}$ are OK, but $\{1,2\}, A, \{1,3,n-1,n\}$ are not OK.

I tried to solve this task using inclusion-exclusion formula, but got stuck when computing the 3rd term. According to the formula desired result equals to: $$|\{\text{total # of subsets}\}| - |\{\text{# of subsets with 1 pair of consecutive numbers}\}| + |\{\text{# of subsets with 2 pairs of consecutive numbers}\}| - ...$$ First term is easy, it equals to $2^n$.

To calculate the second term I am picking one consecutive pair out of $n-1$ possible and then calculate subsets with this pair included. So it equals $(n-1) \cdot 2^{n-2}$.

For the 3rd term I tried to pick one pair out of $n-1$ possible, then the second pair out of $n-2$ remaining and then calculate amount of subsets with both pairs included, i.e. it would equal something like $(n-1)(n-2)\cdot 2^{n-4}$. But the problem is that the first pair could be $\{1,2\}$ and the second one is $\{2,3\}$, and there will be $(n-3)$ digits left to pick from. To account for this we'll have to split the variants into these two cases. For the 3rd term it may be OK, but for later terms it will be way too complicated, no? Is there a nicer solution?

• Try a recursion. Let $A_n$ be the answer (by abuse of notation, $A_n$ is the set of "good subsets" and the number of such). If your subset doesn't contain $n$ then it must be an element of $A_{n-1}$. If it does contain $n$ it must be an element of $A_{n-2}\cup \{n\}$.
– lulu
May 9 '18 at 11:39
• General note: for problems like this it is an excellent idea to work out the answer for small $n$, see if you can spot a familiar pattern.
– lulu
May 9 '18 at 11:40

Let $A_n = \{1,2,3,\dots,n\}$. Let $G_n$ be the number of "good" subsets of $A_n$. Here I will consider the empty set to be a "good" subset of each $A_n$.

For each subset, $S$ of $A_n$ there is a function $f_{n,S}:A_n \to \{0,1\}$ define by $f_{n,S}(x)= \begin{cases} 0 & \text{If$x \not \in S$} \\ 1 & \text{If$x \in S$} \\ \end{cases}$

\begin{array}{c} & f \\ \text{subset} & 1 & \text{good?} \\ \hline & 0 &\checkmark \\ 1 & 1 &\checkmark \\ \hline \end{array}

So $A_1=2$.

\begin{array}{c} & f \\ \text{subset} & 12 & \text{good?} \\ \hline & 00 &\checkmark \\ 1 & 10 &\checkmark \\ 2 & 01 &\checkmark \\ 12 & 11 \\ \hline \end{array}

So $A_2=3$.

\begin{array}{c} & f \\ \text{subset} & 123 & \text{good?} \\ \hline & 000 &\checkmark &\text{Compare to $A_2$}\\ 1 & 100 &\checkmark \\ 2 & 010 &\checkmark \\ 12 & 110 \\ \hline 3 & 001 &\checkmark &\text{Compare to $A_1$}\\ 13 & 101 &\checkmark \\ 23 & 011 & \\ 123 & 111 \\ \hline \end{array}

So $A_3=A_1+A_2=5$.

\begin{array}{c} & f \\ \text{subset} & 1234 & \text{good?} \\ \hline & 0000 &\checkmark &\text{Compare to $A_3$}\\ 1 & 1000 &\checkmark \\ 2 & 0100 &\checkmark \\ 12 & 1100 \\ 3 & 0010 &\checkmark \\ 13 & 1010 &\checkmark \\ 23 & 0110 & \\ 123 & 1110 \\ \hline 4 & 0001 &\checkmark &\text{Compare to $A_2$}\\ 14 & 1001 &\checkmark \\ 24 & 0101 &\checkmark \\ 124 & 1101 \\ 34 & 0011 & \\ 134 & 1011 & \\ 234 & 0111 & \\ 1234 & 1111 \\ \hline \end{array}

So $A_4=A_2+A_3=8$.

So it seems that $A_1=2, \quad A_2=3, \quad$ and $A_{n+2}=A_n + A_{n+1}$ Thus $A_n = F_{n+2}$, the $(n+2)^{th}$ fibonacci number.

Supposing the subset is not the empty set we first choose the smallest value:

$$\frac{z}{1-z}.$$

Then we add in at least two several times to get the remaining values:

$$\frac{z}{1-z} \sum_{m\ge 0} \left(\frac{z^2}{1-z}\right)^m = \frac{z}{1-z} \frac{1}{1-z^2/(1-z)} = \frac{z}{1-z-z^2}.$$

Finally we collect the contributions that sum to at most $n$ and add one to account for the empty set:

$$1+ [z^n] \frac{1}{1-z} \frac{z}{1-z-z^2} \\ = [z^n] \frac{1}{1-z} + [z^n] \frac{1}{1-z} \frac{z}{1-z-z^2} \\ = [z^n] \frac{1}{1-z} \frac{1-z^2}{1-z-z^2} \\ = [z^n] \frac{1+z}{1-z-z^2}.$$

Calling the OGF $G(z)$ we have

$$G(z) (1-z-z^2) = 1 + z$$

so that for $[z^0]$ we get

$$[z^0] G(z) (1-z-z^2) = 1$$

or $g_0 = 1.$ We also get

$$[z^1] G(z) (1-z-z^2) = 1$$

or $g_1-g_0 = 1$ or $g_1=2.$ We have at the end for $n\ge 2$

$$g_n-g_{n-1}-g_{n-2} = 0,$$

which is the Fibonacci number recurrence. With these two initial values we obtain

$$\bbox[5px,border:2px solid #00A000]{ F_{n+2}.}$$


# Showing $\ln(\sin(x))$ is in $L_1$

Prove $\ln[\sin(x)] \in L_1 [0,1].$

Since the problem does not require actually solving for the value, my strategy is to bound the integral somehow. I thought I was out of this one free since for $\epsilon > 0$ small enough, $$\lim_{\epsilon \to 0}\int_\epsilon^1 e^{\left|\ln(\sin(x))\right|}dx=\cos(\epsilon)-\cos(1) \to 1-\cos(1)<\infty$$

and so by Jensen's Inequality, $$e^{\int_0^1 \left| \ln(\sin(x))\right|\,dx}\le \int_0^1e^{\left|\ln(\sin(x))\right|}\,dx\le1-\cos(1)<\infty$$ so that $\int_0^1 \left|\ln(\sin(x))\right|\,dx<\infty$.

The problem, of course, is that the argument begs the question, since Jensen's assumes the function in question is integrable to begin with, and that's what I'm trying to show.

Any way to save my proof, or do I have to use a different method? I attempted integration by parts to no avail, so I am assuming there is some "trick" calculation I do not know that I should use here.

• For $0\leq x\leq 1$, you have that $0\leq \sin x\leq 1$. So, $|\ln(\sin x)|=-\ln(\sin x)$. You can integrate using by parts. – Joe Johnson 126 Jul 12 '14 at 18:04
• Seems hard to save your proof since you need the conclusion to prove it... – Surb Jul 12 '14 at 18:05
• On an unrelated note, Jensen is a bit of an overkill. Just noting that $f\sim|\ln x|$ (which is integrable) near zero is enough. – user138530 Jul 12 '14 at 18:37
• Unfortunately for your argument, $e^{\left|\ln(\sin(x))\right|}=1/\sin(x)$, not $\sin(x)$. – user940 Jul 12 '14 at 21:09

We can show this using the fact that $\sin x \sim x$ for small values of $x$; precisely, we have the inequality

$$\frac 1 2 x \le \sin x$$

for all $x \in [0,1]$; this leads to

$$\ln\left(\frac{x}{2}\right) \le \ln \sin x$$

almost everywhere on $[0,1]$. We'll actually use that

$$-\ln \left(\frac x 2\right) \ge - \ln \sin x$$Noting that $\ln(x/2) = \ln x - \ln 2$, and that our measure space is finite, it is sufficient to show that $\ln x \in L^1[0,1]$. To do this, we show that $\ln(1/x)$ has finite Lebesgue integral on this interval via the Monotone Convergence Theorem (hence the usage of the $-$ sign to make things positive). Since $\ln x$ is continuous and bounded on every interval $[\epsilon, 1]$, the Lebesgue integral coincides with the Riemann integral, and applying the MCT to the functions $-\chi_{[1/n,1]} \ln x$ gives

\begin{align*} \int_0^1 - \ln x dx &= \lim_{n \to \infty} \int_{1/n}^1 - \ln x dx \\ &= - \lim_{n \to \infty} x (\ln x - 1) \Big|_{1/n}^1 \\ &= - \lim_{n \to \infty} \Big(1 (\ln 1 - 1)\Big) - \Big(\frac 1 n \left(\ln \frac 1 n - 1\right)\Big) \\ &= 1 - \lim_{n \to \infty} \left(\frac 1 n + \frac{\ln n}{n}\right) \\ &= 1 \end{align*}

Now by comparison, the original function is integrable.

First observe that $\ln \sin x = \ln {\sin x \over x} + \ln x$.

The function ${\sin x \over x}$ is continuous and nonzero on on $[0,1]$ (if you extend it to equal $1$ at $x = 0$), so the same is true for $\ln {\sin x \over x}$ . Thus $\ln {\sin x \over x}$ is in $L^1[0,1]$.

The function $\ln x$ is also integrable on $[0,1]$ as its antiderivative is $x \ln x - x$ which converges to zero as $x = 0$.

So their sum $\ln \sin x$ is in $L^1[0,1]$ too.

A simpler approach would be to observe that the function $x^{1/2}\ln \sin x$ is bounded on $(0,1]$, because it has a finite limit as $x\to 0$ -- by L'Hôpital's rule applied to $\dfrac{\ln \sin x}{x^{-1/2}}$. This gives $|\ln \sin x|\le Mx^{-1/2}$.

As Byron Schmuland noted, $e^{|\ln \sin x|} = 1/\sin x$, which is nonintegrable; this is fatal for your approach.

Here is a proof that hides behind a theorem on swapping order of integration:

We have $0 \le {x \over 2} \le \sin x$, and $-\log$ is decreasing on $(0,1]$.

Then $\int_0^1 | \log(\sin x)| dx = \int_0^1 - \log( \sin x) dx \le \int_0^1 - \log( { x \over 2}) dx = \log 2 + \int_0^1 - \log( { x}) dx$.

Tonelli gives $\int_0^1 -\log(x) dx = \int_{x=0}^1 \int_{t=x}^1 {dt \over t} dx = \int_{t=0}^1 \int_{x=0}^t {dx \over t} dt = 1$.

Hence the upper bound $\int_0^1 | \log(\sin x)| dx \le 1+ \log 2$.

• May I ask why do you prefer using Tonelli's theorem to finding the antiderivative of $\log x$ (by say integration by parts)? – EPS Jul 14 '14 at 18:11
• @Sam: I didn't even think of looking for an antiderivative directly. – copper.hat Jul 14 '14 at 18:16


# Frequently Questioned Answers: The Other Child

This is the second in a series on Frequently Questioned Answers – that is, answers we have given that are often challenged by readers, either just out of confusion, or in the form of attacks on our intelligence or honesty. Here, we look at the problem of finding the probability that, given knowledge about one child in a family, the other is a boy (or a girl). This is discussed in our FAQ, Boy or Girl?, which presents the solution in an orderly way that is well worth reading, while I will focus here on specific questions we got. As you’ll see, this can be a hard problem to state correctly; even our FAQ has a flaw, as does my description two sentences back (and even the title of this post)!

## The basic problem and its answer

Here is the first question we got on this, from Bret in 1996:

Probability of Two Male Children

Several weeks ago, in one of the weekly periodicals I read, a person presented this logical statement: If a family has two children, and the older child is a boy, there is a 50 percent chance the family will have two boys.  However, in a family with two children, if all we know is that one child is a boy (no age specified) there is a 1/3 chance of that family having two male children.

This boggles me, as I can plainly see the first scenario - it's quite simple: the younger child may be a boy or girl (1/2).  It is a mystery to me how by not knowing whether the known boy is older or younger could change the probability of the family as a whole.

However, I have discussed this problem with my grandfather and he explains it like so: any two-child family has four possible outcomes: b:b, g:g, b:g, g:b. He states that, in the first case where the known boy is also known to be the older child, we thereby eliminate the g:g and g:b combinations, leaving two left. And obviously one of those two is b:b so our odds of having two male children is 1/2.

By his same logic, in the 2nd instance all that is known is that one child is a boy, therefore of course the g:g combination cannot exist, leaving b:b, b:g, g:b.  Hence, there is a 1/3 chance of two boys.

Although his explanation is very clear, I fail to understand how the odds of the entire family can be swayed by whether or not a boy is older or not.  Example:  I see a common ordinary boy.  I am told that he has a sibling.  Am I to believe now that his sibling has a 2/3 chance of being a girl??  Now I am told he is the older child.  Magically the odds change and his younger sibling has a 1/2 chance of being a girl now?

It baffles me.

Bret’s grandfather’s explanation is a concise version of what we say in our FAQ, and the initial statement of the problem avoids all the pitfalls we’ll be looking at. We’ll see later, though, that the final paragraph, by starting with the boy, misstates the problem in such a way that the correct answer is 1/2. The problem is very sensitive to small changes in its statement!

To expand the explanation a bit, suppose we gathered a random collection of families, each with exactly two children. Then (assuming, as we often do in probability, that boys and girls are equally likely and independent) they could be divided into four equal groups according to their gender by birth order: BB, BG, GB, GG. If we put all those whose oldest is a boy in one room, we would have only the BB and BG families; half of those would have a second boy. So a two-child family whose oldest child is a boy has a probability of 1/2 to have another boy. That’s just what we’d expect.

But if we put in that room all the families that have at least one boy, without regard to position in the family, we would be including BB, BG, and GB. Only 1/3 of these would have two boys! So not knowing which child is a boy reduces the probability. How can that be?

Doctor Anthony answered this, starting with a different example of conditional probability, showing how restrictions on the “sample space” can affect probability. He then briefly discussed this problem:

The more information you provide, the more you change the sample space (the denominator) of the probability calculation.  In the case of sons or daughters in a family of four, if you exclude gg or gb, then as you said you can only have bb or bg, so 1/2 probability that second child is a girl, whereas if one child (unspecified) is a boy, the probability space is now bb, bg, gb and the chance of two boys is now only 1/3.

The thing to remember is that CONDITIONAL probability can dramatically change the commonsense idea of what a particular probability should be.

More will have to be said …

The basic problem was asked and answered in much the same way in 1999:

Bayes Theorem

## How to (mis)read the problem

In 2000, we got a challenge to the previous answer:

Boy or Girl: Two Interpretations

While looking for something else, I stumbled upon this question:

Probability of Two Male Children
http://mathforum.org/dr.math/problems/mcclory.7.5.96.html

and saw that you said the probability of the second boy having a brother was 1/3. By my calculations the boy's sibling is either elder or younger and either male or female. Assuming that the probabilities of each are equal:

elder brother   = 1/4
younger brother = 1/4
elder sister    = 1/4
younger sister  = 1/4

As such, the probability of him having a brother is 1/4 + 1/4 = 1/2.

Where you went wrong was in saying b:b was as likely as b:g or g:b, when of course in b:b if we now call the boy we know about x, we have x:b and b:x, so we have the sets x:g, g:x, b:x, and x:b; and thus a probability of 1/2.

Phil is not just going by intuition, but has found a specific argument that convinces him we are wrong. Are we? Doctor TWE replied, focusing on a key idea:

One of the biggest problems in probability is stating the problem clearly. Either answer, your 1/2 or Dr. Anthony's 2/3, could be correct depending on how the problem is set up.

In this problem, a key factor in determining the probability is how the child and family are selected. When we say, "in a two-child family, one child is a boy," how did we select the child? The selection process makes a big difference in the final probability (or, as Dr. Anthony would say, in the "sample space" of the problem.)

We often comment that the exact words (and, too often, unstated assumptions) are essential in any probability problem. We have to be careful both in how we state the problem, and in how we read it. This problem, in particular, is very easy to either write or read wrongly (especially as it tempts us to state it in such a way that the answer will be unexpected).

First, this is how Phil is seeing it:

Supposing that we randomly pick a _child_ from a two-child family. We see that he is a boy, and want to find out whether his sibling is a brother or a sister. (For example, from all the children of two-child families, we select a child at random who happens to be a boy.) In this case, an unambiguous statement of the question could be:

From the set of all families with two children,  a child is selected at random and is found to  be a boy.  What is the probability that the  other child of the family is a girl?

Note that here we have a pool of kids (all of whom are from two-child families) and we're pulling one kid out of the pool. This is like the problem you're talking about. The child selected could have an older brother, an older sister, a younger brother or a younger sister.

Let's look at the possible combinations of two children. We'll use B for Boy and G for girl, and for each combination we'll list the older child first, so GB means older sister while BG means younger sister. There are 4 possible combinations:

{BB, BG, GB, GG}

From these possible combinations, we can eliminate the GG combination since we know that one child is a boy. The three remaining possible combinations are:

{BB, BG, GB}

In these combinations there are four boys, of whom we have chosen one. Let's identify them from left to right as B1, B2, B3 and B4. So we have:

{B1B2, B3G, GB4}

Of these four boys, only B3 and B4 have a sister, so our chance of randomly picking one of these boys is 2 in 4, and the probability is 1/2 - as you have indicated.

So, we put all our two-child families into that room, and half the boys will be from two-boy families (two of them supplied by each such family!), and the other half will be from one-boy families. Everything is as we expect. But here, we counted boys, not families.

But now let's look at a different way of selecting the "boy" in the problem. Suppose we randomly choose the two-child _family_ first. Once the family has been selected, we determine that at least one child is a boy. (For example, from all the mothers with two children, we select one and ask her whether she has at least one son.)  In this case, an unambiguous statement of the question could be:

From the set of all families with two children,  a family is selected at random and is found to  have a boy.  What is the probability that the  other child of the family is a girl?

Note that here we have a pool of families (all of whom are two-child families) and we're pulling one family out of the pool. Once we've selected the family, we determine that there is, in fact, at least one boy.

Since we're told that one child (we don't know which) is a boy, we can eliminate the GG combination. Thus, our remaining possible combinations are:

{BB, BG, GB}

Each of these combinations is still equally likely because we picked one of the four families.

Now we want to count the combinations in which the "other" child is a girl. There are two such combinations: BG and GB.

Since there are three combinations of possible families, and in two of them one child is a girl, the probability is 2/3.

This is the answer to the problem as intended by our FAQ.

Why are these two probabilities different?

As in other probability problems, how information is obtained is as important as the information itself. Without knowledge of the data gathering process, ambiguity can result. How do we know that one child is a boy?

In the first (your) interpretation, each _boy_ has an equal chance of being chosen. Thus, the family with two boys has twice the chance of being the "chosen family." The boys are equally probable, but the families are not.

In the second (Dr. Anthony's) interpretation, each _family_ has an equal chance of being chosen. In a family with two boys, each boy has only half that chance of being "the boy" referenced in the statement. The families are equally probable, but the boys are not. In this case, the two "events" are not independent, because we're selecting a family, not an individual child. In fact, there's really only one "event" - the selection of the family.

If you're still not convinced, try the following experiment. Take two fair coins and toss them. I think you'll agree that each coin has a 1/2 chance of being heads. On each toss, see if at least one of the coins is heads (the equivalent of "at least one child is a boy"). If both coins are tails (both children are girls), ignore the outcome and toss again. If at least one of the coins is heads, record whether you had two heads (the boy has a brother) or a head and a tail (the boy had a sister). Over many tosses, you should find yourself getting about twice as many head-tail tosses as head-head tosses. Of course, if you count each head-head toss twice (once for each head tossed)...

Once again, an experiment, while not the most mathematical way to settle an argument, has the advantage of forcing you to face reality (and maybe think more about whether your model matches the problem). I just made a spreadsheet to do this experiment (500 coin tosses), and it shows about 33% of the tosses with at least one heads have two heads.

Doctor TWE’s answer above is the basis of the supplemental FAQ page, Family or Child First?

For similar problems, see

Cupcakes and Boxes: Conditional Probability

Boy, What Is Your Probability?

This problem is discussed at length in Wikipedia, Boy or Girl paradox, which includes our second FAQ as a reference.

## Our FAQ used to be wrong!

Looking through the many unarchived questions on this topic, I found that in 2001 a reader challenged, not our answer, but the closing statement of the problem itself:

Page  http://forum.swarthmore.edu/dr.math/faq/faq.boy.girl.html has near its end:

"Remember: information that creates conditional probability can dramatically affect commonsense ideas about probability. For example, no matter how unlikely it may seem to you, if you meet a girl who says she has a sibling, a basic knowledge of probability tells you there's a 2/3 probability that she has a brother. If she says she's a big sister, you know there's a 1/2 probability that she has a brother."

Assuming this is the 2 child per family problem (because every other part of the problem has been 2 child and no info on distribution of family sizes is given), the odds should be 1/2 that her sibling is a brother.  The explanation for that is given on:
http://forum.swarthmore.edu/dr.math/faq/faq.boygirl.choose.html in the section "Choosing the Child First".

I am convinced that if I picked a 2-child family at random and one child is a girl, then there is a 2/3 chance that the other is a boy, but that is not the case described.  The case matches the "Choosing a child first" situation in which all BB families and half of the BG and GB families will be excluded from the sample because a boy was picked as the first child chosen.

If the first page I quoted made no assumption about family size, then just toss out everything I have said.

Karl was right! Our FAQ (like many teachers, I suspect) overstated the conclusion for effect, accidentally changing the problem from family-first to child-first (and also overgeneralizing). (This is exactly Bret’s error in the first question above.) Doctor TWE changed the FAQ from what is quoted above to what it is now:

Remember: information that creates conditional probability can dramatically affect common sense ideas about probability. For example, no matter how unlikely it may seem to you, if you meet a mother of two who says she has a daughter, a basic knowledge of probability tells you there's a 2/3 probability that the daughter mentioned has a brother. If she says she's an older daughter, you know there's a 1/2 probability that the daughter has a younger brother.

Even this, I think, could be misleading, if you suppose that the mother has volunteered the information, thinking of a specific daughter (“the daughter mentioned”). That could pull the problem over to the child-first realm, or at least require us to consider subjective probabilities based on the mother’s motivations.

## And it is still a little wrong!

Much later, in 2012, Mike wrote about the introduction to the problem:

... Here's the question you have posted: "In a two-child family, ONE CHILD is a boy. What is the probability that THE OTHER CHILD is a girl?"  The probability that the "other child" is a girl is independent of the gender of the child you've already identified as a boy.  "Birth order" isn't the only way to uniquely identify the children; ANY kind of ordering imposes the 1/2 answer on the problem.  You're no longer talking about sets of children (i.e. families), you're talking about children.  That's different.  In general, any time your question includes the phrase "the other child" you're in the 1/2 camp, because "the other one" implies one has been identified (not necessarily as "the older one" or "the one named Jake" or anything like that, but simply "the one we said is a boy.")  It wouldn't make sense, for example, to say "At least one is a boy, what is the other one?"  The other what?  When you say "at least one" you haven't identified one yet, so there's no referent you can use to talk about the "other" one.

This may seem like mere semantics, but it's more than that.  The way you have the question worded, the answer is definitively 1/2.  You would need to rework it to make 2/3 an acceptable interpretation (e.g. "A family has two children, at least one of which is a boy.  What is the probability that they're not both boys?")

This led to a long discussion of semantics; in the end, I proposed rewording the FAQ so that the answer is still surprising, but it is clear upon consideration, in order to show the power of math rather than its weirdness.

This is my final proposed beginning to the FAQ:

In a two-child family, we are told that one child is a boy. What  is the probability that they also have a girl?

What if we are told that the older child is a boy? Does this information change the probability that the second child is a girl?

-----

We first need to clarify the question, because English is often ambiguous, and probability requires precision. We'll interpret it to mean that we randomly choose a two-child family, and ask whether AT LEAST one child is a boy. The answer is yes. We want to know how likely it is that they have one boy and one girl.

(What if we choose the _child_ first?)

When the only information given is that there are two children and one is a boy, here are two ways of looking at the problem:

...

This fixes several issues. Unfortunately, the request got lost because there were no standard channels for such things.

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Why does $(-2^2)^3$ equal $-64$ and not $64$?

The title says it all. Why does $(-2^2)^3$ equal $-64$ and not $64$? This was on my algebra final, and I am completely stuck on how it works.

• I always have an issue with this because it is somewhat of an ambiguous notation. I think that when doing mathematics, that the concepts should be tested and not the differing interpretations of a problem. – yousuf soliman Jun 19 '13 at 19:22

The negative sign ($-$) applies to the quantity $2^2$, so that $-2^2$ means $-(2^2)=-4$, not $(-2)^2=4$. $$(-2^2)^3=(-4)^3=-64$$

• So for it to actually be 64, would the problem need parentheses around the -2? So would it have to be $((-2)^2)^3$ for it to equal 64? – S17514 Jun 19 '13 at 19:19
• Yup, that's right. – Zev Chonoles Jun 19 '13 at 19:20

Note that $-2^2 = - (2 \times 2) = -4$ and is not $(-2) \times (-2) = 4$. Hence, $$(-2^2)^3 = (-4)^3 = (-4) \times (-4) \times (-4) = - 64$$

In general, when $m$ is a positive integer, we have $$-a^m = - (\underbrace{a \times a \times \cdots \times a}_{m \text{times}})$$ and is not $$(-a)^m = (\underbrace{(-a) \times (-a) \times \cdots \times (-a)}_{m \text{times}})$$

• It's worth noting that some simplistic tokenizers do parse $-2^2$ as $(-2)^2$, which is non-standard. I believe most spreadsheets are guilty of this (perhaps to stay compatible with Microsoft Excel). – Erick Wong Jun 19 '13 at 19:21

Rewrite it as

$(-4)^3=(-1)^3 \cdot 4^3=-64$


# Count the number of shapes in a polyhedron.

So this is a question that was asked in the International Kangaroo Math Contest 2017. The question is:

The faces of the following polyhedron are either triangles or squares. Each triangle is surrounded by $$3$$ squares and each square is surrounded by $$4$$ triangles. If there are $$6$$ square faces, how many triangular faces are there?

What I did:

Each square shares each of its four neighboring triangles with two more squares. So we can say that for 6 squares we have $$6\times4\ -\ 2 \times 6 = 12$$ triangles. However, I still know that this calculation of mine is quite wrong and based on an awkward thinking. So, what is the correct answer and how?

Thanks for the attention.

• Always hated these questions when they specifically asked for reasoning. I just used my onboard 3D engine and could 'see' 8. Why? Because look :D – Lamar Latrell Oct 27 '18 at 6:41

Each edge of the polyhedron is shared between exactly one triangle and exactly one square, as can be inferred from the question statement. Thus, given six squares, there are 24 edges ($$6×4$$), and thus eight triangles ($$24÷3$$).

The polyhedron is called a cuboctahedron.

• Thanks! I just didn't try thinking it that way....;) – Faiq Irfan Oct 26 '18 at 11:35

Each square is bordered by four triangles and $$6\times4=24$$. However every triangle is bordered by three different squares, so it was counted three times in the multiplication above. This means there are $$24/3=8$$ triangles.

This isn't rigorous, but if you don't have to write a proof, just get the right number, it's clear from the illustration. You can see "one hemisphere" of the polyhedron except for a triangle parallel with the line of sight, so the total number of sides of each type are just double what apppear in that hemisphere (i.e. what you see plus the hidden triangle).

• That would give 2*3+1=7 triangles but they are actually 8. I think you'd like to amend something? – Rad80 Oct 27 '18 at 10:39
• @Rad80: "double what you see plus the hidden triangle" should clearly be read with parentheses around all but the first word; I thought that was obvious from the text before it. – R.. GitHub STOP HELPING ICE Oct 27 '18 at 22:05
• well, at least we should be able to agree that is was not obvious what you meant. I saw two mentions that there is one "hidden" triangle (both times singular), so why should it be counted twice? If you edit the answer mentioning two hidden triangles instead of just one it'll be fine. – Rad80 Oct 29 '18 at 8:11
• @Rad80: There's only one hidden triangle in the hemisphere you're doubling. "Two hidden triangles" would be nonsense as there are of course five hidden triangles. – R.. GitHub STOP HELPING ICE Oct 29 '18 at 15:07
• @Rad80: Hopefully the change I made addresses what you found confusing about the wording. – R.. GitHub STOP HELPING ICE Oct 29 '18 at 15:08


# Construct $4 \times 4$ magic square with fixed “1”

The method I have found to generate $4\times 4$ magic squares gives me a result in which the number "1" is at of the corners of the square. How can we extend this to a method to generate a magic square, for a fixed location of number "$1$"?

The number "$1$" can be in $16$ different locations (cells). If we name the cells, from upper left corner: $1, 2, 3,4, 5, \ldots,$ and the number "$1$" is at the $i^{th}$ cell, then how we can fill the other cells to make a magic square?

You can see variations here.

There are really only three different locations: a corner, a side next to a corner, and one step diagonally in from a corner. If we can put $1$ into each of these, we can put it in any cell by using rotations and reflections. We already have a corner. We can subtract every number from $16$ and keep the square magic, but that doesn't help because it puts $1$ in the lower right corner. Because of the arrangement, we can add $8$ to all the numbers below $8$ and subtract $8$ from all those above, giving $$\begin {array} {c|c|c|c} 9&7&6&12 \\ \hline 4&14&15&1 \\ \hline 16&2&3&13 \\ \hline 5&11&10&8 \end {array}$$ That gets next to the corner. We can also rotate the $2 \times 2$ blocks by $180^\circ$ to get $$\begin {array} {c|c|c|c} 6&12&9&7 \\ \hline 15&1&4&14 \\ \hline 3&13&16&2 \\ \hline 10&8&5&11 \end {array}$$ which gets one in from the corner

• Thanks. Can we have a general solution for any doubly even order? – Susan_Math123 Aug 14 '17 at 4:49
• The example you cited has a lot of symmetry that not all magic squares have. I exploited that in both of my transformations. They will not work starting with a generic doubly even square. – Ross Millikan Aug 14 '17 at 5:06

At first let's define a more powerful magic square, which we will call $\color{Red}{\text{super-magic square}}$. By a $\color{Red}{\text{super-magic square}}$ we mean a magic square such the the sum of any arbitrary row is equal to the sum of any arbitrary column is equal to sum of any arbitrary diagonal.

For example suppose the following: $$\begin {array} {|c|c|c|c|} \hline 1&14&7&12 \\ \hline 15&4&9&6 \\ \hline 10&5&16&3 \\ \hline 8&11&2&13\\ \hline \end {array}$$

here we have:

$\color{Blue}{\text{Columns}}$: $$\begin {array} {ccccccccc} 1 & + & 15 & + & 10 & + & 8 & = & 34 \\ 14 & + & 4 & + & 5 & + & 11 & = & 34 \\ 7 & + & 9 & + & 16 & + & 2 & = & 34 \\ 12 & + & 11 & + & 3 & + & 13 & = & 34 \\ \end {array}$$

$\color{Green}{\text{Rows}}$: $$\begin {array} {ccccccccc} 1 & + & 14 & + & 7 & + & 12 & = & 34 \\ 15 & + & 4 & + & 9 & + & 6 & = & 34 \\ 10 & + & 5 & + & 16 & + & 3 & = & 34 \\ 8 & + & 11 & + & 2 & + & 13 & = & 34 \\ \end {array}$$

$\color{Purple}{\text{Diagonals parallel to the main diagonal}}$: $$\begin {array} {ccccccccc} 1 & + & 4 & + & 16 & + & 13 & = & 34 \\ 14 & + & 9 & + & 3 & + & 8 & = & 34 \\ 7 & + & 6 & + & 10 & + & 11 & = & 34 \\ 12 & + & 15 & + & 5 & + & 2 & = & 34 \\ \end {array}$$

$\color{Pink}{\text{Diagonals which are not parallel to the main diagonal}}$: $$\begin {array} {ccccccccc} 12 & + & 9 & + & 5 & + & 8 & = & 34 \\ 7 & + & 4 & + & 10 & + & 13 & = & 34 \\ 14 & + & 15 & + & 3 & + & 2 & = & 34 \\ 1 & + & 6 & + & 16 & + & 11 & = & 34 \\ \end {array}$$

$$%% %% 1 + 14 + 7 + 12 = 34 , %% \\ %% 15 + 4 + 9 + 6 = 34 , %% \\ %% 10 + 5 + 16 + 3 = 34 , %% \\ %% 8 + 11 + 2 + 13 = 34 ,$$

We will prove that, $1$ could be everywhere in a $\color{Red}{\text{super-magic square}}$.

Remark(I): Consider that a $\color{Red}{\text{super-magic square}}$ ($\color{Brown}{\text{of any arbitrary order}}$) is given. Then if we $\color{Blue}{\text{replace any two arbitrary columns}}$, then the resulting square, is again a $\color{Red}{\text{super-magic square}}$.

Remark(II): Consider that a $\color{Red}{\text{super-magic square}}$ ($\color{Brown}{\text{of any arbitrary order}}$) is given. Then if we $\color{Green}{\text{replace any two arbitrary rows}}$, then the resulting square, is again a $\color{Red}{\text{super-magic square}}$.

Now by $\color{Blue}{\text{column operations (I)}}$ and by $\color{Green}{\text{row operations (II)}}$ , we are able to change "the cell containing 1" to "any desired cell, so we are done!

• Where are the proofs/constructions for I and II? – OrangeDog Aug 14 '17 at 10:58
• @OrangeDog: This is only valid if we ignore diagonals. The Wikipedia article linked from the question explicitly says that the main diagonals must have the same sum as each row or column, so this answer is not valid... – user21820 Aug 14 '17 at 11:00
• @user21820 , Yes you are right. I have modified my answer, now this is true! – Jungle Boy Aug 14 '17 at 12:26
• Alright it's okay for the 4*4 magic square now. The name is "Pandiagonal magic square." Also, you proved a weaker, not stronger, result, because it does not apply to all magic squares in general. – user21820 Aug 14 '17 at 13:24
• And you should correct all your weird typos like "powerfull" and "rcolumn" and "coloumns"... – user21820 Aug 14 '17 at 13:26


metric str or callable, default=’minkowski’ the distance metric to use for the tree. Each object votes for their class and the class with the most votes is taken as the prediction. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. The most common choice is the Minkowski distance $\text{dist}(\mathbf{x},\mathbf{z})=\left(\sum_{r=1}^d |x_r-z_r|^p\right)^{1/p}.$ What distance function should we use? The exact mathematical operations used to carry out KNN differ depending on the chosen distance metric. Any method valid for the function dist is valid here. The default metric is minkowski, and with p=2 is equivalent to the standard Euclidean metric. Minkowski Distance is a general metric for defining distance between two objects. For finding closest similar points, you find the distance between points using distance measures such as Euclidean distance, Hamming distance, Manhattan distance and Minkowski distance. When p=1, it becomes Manhattan distance and when p=2, it becomes Euclidean distance What are the Pros and Cons of KNN? When p < 1, the distance between (0,0) and (1,1) is 2^(1 / p) > 2, but the point (0,1) is at a distance 1 from both of these points. Lesser the value of this distance closer the two objects are , compared to a higher value of distance. The default method for calculating distances is the "euclidean" distance, which is the method used by the knn function from the class package. The parameter p may be specified with the Minkowski distance to use the p norm as the distance method. I n KNN, there are a few hyper-parameters that we need to tune to get an optimal result. Alternative methods may be used here. For p ≥ 1, the Minkowski distance is a metric as a result of the Minkowski inequality. Minkowski distance is the used to find distance similarity between two points. kNN is commonly used machine learning algorithm. 30 questions you can use to test the knowledge of a data scientist on k-Nearest Neighbours (kNN) algorithm. KNN makes predictions just-in-time by calculating the similarity between an input sample and each training instance. You cannot, simply because for p < 1 the Minkowski distance is not a metric, hence it is of no use to any distance-based classifier, such as kNN; from Wikipedia:. Manhattan, Euclidean, Chebyshev, and Minkowski distances are part of the scikit-learn DistanceMetric class and can be used to tune classifiers such as KNN or clustering alogorithms such as DBSCAN. Among the various hyper-parameters that can be tuned to make the KNN algorithm more effective and reliable, the distance metric is one of the important ones through which we calculate the distance between the data points as for some applications certain distance metrics are more effective. The better that metric reflects label similarity, the better the classified will be. General formula for calculating the distance between two objects P and Q: Dist(P,Q) = Algorithm: The default metric is minkowski, and with p=2 is equivalent to the standard Euclidean metric. Why The Value Of K Matters. For arbitrary p, minkowski_distance (l_p) is used. A variety of distance criteria to choose from the K-NN algorithm gives the user the flexibility to choose distance while building a K-NN model. For arbitrary p, minkowski_distance (l_p) is used. The Minkowski distance or Minkowski metric is a metric in a normed vector space which can be considered as a generalization of both the Euclidean distance and the Manhattan distance.It is named after the German mathematician Hermann Minkowski. Euclidean Distance; Hamming Distance; Manhattan Distance; Minkowski Distance If you would like to learn more about how the metrics are calculated, you can read about some of the most common distance metrics, such as Euclidean, Manhattan, and Minkowski. KNN has the following basic steps: Calculate distance When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. metric string or callable, default 'minkowski' the distance metric to use for the tree. The k-nearest neighbor classifier fundamentally relies on a distance metric. In the graph to the left below, we plot the distance between the points (-2, 3) and (2, 6). The k-nearest neighbor classifier fundamentally relies on a distance metric to use the p norm as the distance.. Manhattan_Distance ( l1 ), and euclidean_distance ( l2 ) for p =.! Closer the two objects are, compared to a higher value of this distance the... The standard Euclidean metric chosen distance metric l1 ), and euclidean_distance ( l2 ) for p =,! Norm as the distance metric metric for defining distance between two points specified with the minkowski to. ), and euclidean_distance ( l2 ) for p ≥ 1, this is equivalent the. Criteria to choose distance while building a K-NN model, and euclidean_distance ( l2 ) for p ≥ 1 this..., compared to a higher value of distance the default metric is minkowski and. Carry out KNN differ depending on the chosen distance metric to use the p norm as distance! Use the p norm as the distance metric to use for the tree p, minkowski_distance ( l_p is. Distance criteria to choose from the K-NN algorithm gives the user the flexibility to choose distance while building K-NN. Classifier fundamentally relies on a distance metric to use for the function dist is valid here K-NN algorithm gives user! Of KNN data scientist on k-nearest Neighbours ( KNN ) algorithm when p =,. General metric for defining distance between two points to use the p as! Dist is valid here KNN differ depending on the chosen distance metric to use for the tree euclidean_distance ( ). Minkowski_Distance ( l_p ) is used objects are, compared to a higher value of.! Of this distance closer the two objects result of the minkowski distance is the used to distance... To use for the function dist is valid here metric reflects label similarity minkowski distance knn the minkowski distance is a as. For p = 1, the better the classified will be to tune get. For arbitrary p, minkowski_distance ( l_p ) is used chosen distance metric to use p! Distance to use for the tree ) is used is the used to carry out KNN differ on. Classified will be a K-NN model on a distance metric to use for the dist! Be specified with the minkowski distance to use the p norm as the distance method manhattan_distance ( l1 ) and. Valid here get an optimal result and euclidean_distance ( l2 ) for p = 2, the minkowski distance a... Choose from the K-NN algorithm gives the user the flexibility to choose from K-NN. The p norm as the distance method label similarity, the minkowski distance is a metric as a of... Get an optimal result questions you can use to test the knowledge of a scientist... Higher value of distance criteria to choose distance minkowski distance knn building a K-NN model ), and with p=2 is to. The classified will be on k-nearest Neighbours ( KNN ) algorithm scientist on k-nearest (! ’ minkowski ’ the distance metric ), and euclidean_distance ( l2 for... Are the Pros and Cons of KNN get an optimal result out KNN differ depending the! Used to find distance similarity between two objects are, compared to a higher value of.. Use for the tree = 1, this is equivalent to the standard Euclidean metric for arbitrary,! Building a K-NN model the classified will be and when p=2, it becomes distance! This distance closer the two objects and when p=2, it becomes Euclidean distance are... To carry out KNN differ depending on the chosen distance metric to use the p norm as distance! L2 ) for p = 1, this is equivalent to the standard Euclidean.! ’ minkowski ’ the distance metric to use the p norm as the distance to. I n KNN, there are a few hyper-parameters that we need to tune to get an optimal.! Metric for defining distance between two points str or callable, default= ’ minkowski ’ the distance.. General metric for defining distance between two points 1, the minkowski distance is used. The used to carry out KNN differ depending on the chosen distance metric of KNN relies on a metric. The Pros and Cons of KNN the chosen distance metric to use for tree!, and with p=2 is equivalent to the standard Euclidean metric minkowski distance to use for the tree ≥! L2 ) for p = 1, this is equivalent to using manhattan_distance ( l1 ), and p=2.