Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to Bhoddhisatva,scotia,Anonymous,Cornytiv34,Anonymous, for Donating to support the site

Chicks

AsleepInYorkshire
Lemon Half
Posts: 7383
Joined: February 7th, 2017, 9:36 pm
Has thanked: 10514 times
Been thanked: 4658 times

Chicks

#368304

Postby AsleepInYorkshire » December 21st, 2020, 11:46 am

100 chicks sit peacefully in a circle in a barn. Each chick suddenly pecks the chick randomly once to its left or right. What is the expected number of unpecked chicks.

No chicks were harmed in the making of this question

(Merry Xmas)

AiY

AleisterCrowley
Lemon Half
Posts: 6381
Joined: November 4th, 2016, 11:35 am
Has thanked: 1880 times
Been thanked: 2026 times

Re: Chicks

#368366

Postby AleisterCrowley » December 21st, 2020, 2:12 pm

I think it should be 25, but have no idea why

Watis
Lemon Quarter
Posts: 1401
Joined: November 5th, 2016, 10:53 am
Has thanked: 352 times
Been thanked: 489 times

Re: Chicks

#368370

Postby Watis » December 21st, 2020, 2:23 pm

AleisterCrowley wrote:I think it should be 25, but have no idea why



I thought 25 too, based on mentally modelling a circle of just four chicks and the random pecking. Then multiplied my answer - 1 - by 25 to get the answer for 100.

And, after further analysis, I concluded that the answer would be the same for ducklings.

Watis

AleisterCrowley
Lemon Half
Posts: 6381
Joined: November 4th, 2016, 11:35 am
Has thanked: 1880 times
Been thanked: 2026 times

Re: Chicks

#368380

Postby AleisterCrowley » December 21st, 2020, 2:38 pm

I modelled it on Excel, but the formulae may be a bit ropey
If you substitute ducks you get a type mismatch error

(you can't get pecked by a duck anyway, they just bill you)
Last edited by AleisterCrowley on December 21st, 2020, 2:44 pm, edited 2 times in total.

AleisterCrowley
Lemon Half
Posts: 6381
Joined: November 4th, 2016, 11:35 am
Has thanked: 1880 times
Been thanked: 2026 times

Re: Chicks

#368382

Postby AleisterCrowley » December 21st, 2020, 2:42 pm

chance of individual duck, ermm, chick not being pecked by left nbr =0.5, and by right nbr 0.5
Overall chance of avoiding a good pecking - = (0.5 x 0.5) = 0.25. So 100 chicks =25 unpecked
Last edited by AleisterCrowley on December 21st, 2020, 2:45 pm, edited 1 time in total.

jfgw
Lemon Quarter
Posts: 2533
Joined: November 4th, 2016, 3:36 pm
Has thanked: 1096 times
Been thanked: 1145 times

Re: Chicks

#368383

Postby jfgw » December 21st, 2020, 2:43 pm

For each chick, there is a 50% chance of being pecked from the left and a 50% chance of being pecked from the right. Since the two events are independent, that gives a 25% chance of being pecked twice and a 25% chance of not being pecked at all. I would, therefore, agree that the answer will, on average, be 25.

Julian F. G. W.

AleisterCrowley
Lemon Half
Posts: 6381
Joined: November 4th, 2016, 11:35 am
Has thanked: 1880 times
Been thanked: 2026 times

Re: Chicks

#368384

Postby AleisterCrowley » December 21st, 2020, 2:43 pm

But what of the ducks, Julian ?

GoSeigen
Lemon Quarter
Posts: 4335
Joined: November 8th, 2016, 11:14 pm
Has thanked: 1583 times
Been thanked: 1561 times

Re: Chicks

#368395

Postby GoSeigen » December 21st, 2020, 2:56 pm

AsleepInYorkshire wrote:100 chicks sit peacefully in a circle in a barn. Each chick suddenly pecks the chick randomly once to its left or right. What is the expected number of unpecked chicks.

No chicks were harmed in the making of this question

(Merry Xmas)

AiY


Well my first thought was 16 but couldn't be bothered to show the working. However, since others have chipped in...


Hmm, and just a comment, looks like others are treating the being-pecked events as independent. Looks fishy to me...

GS

bluedonkey
Lemon Quarter
Posts: 1783
Joined: November 13th, 2016, 3:41 pm
Has thanked: 1383 times
Been thanked: 646 times

Re: Chicks

#368409

Postby bluedonkey » December 21st, 2020, 3:24 pm

AA
AB
BA
BB

=25

jfgw
Lemon Quarter
Posts: 2533
Joined: November 4th, 2016, 3:36 pm
Has thanked: 1096 times
Been thanked: 1145 times

Re: Chicks

#368440

Postby jfgw » December 21st, 2020, 4:23 pm

GoSeigen wrote:Hmm, and just a comment, looks like others are treating the being-pecked events as independent. Looks fishy to me...

That did since occur to me. If one chick is not pecked, both chicks the other side of its neigbours will be.

What have fish got to do with it?


Julian F. G. W.

UncleEbenezer
The full Lemon
Posts: 10658
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1451 times
Been thanked: 2956 times

Re: Chicks

#368441

Postby UncleEbenezer » December 21st, 2020, 4:24 pm

AleisterCrowley wrote:But what of the ducks, Julian ?

They're quistmas quackers. Not for pecking.

And whatever happened to social distancing in these days of bird flu?

jfgw
Lemon Quarter
Posts: 2533
Joined: November 4th, 2016, 3:36 pm
Has thanked: 1096 times
Been thanked: 1145 times

Re: Chicks

#368446

Postby jfgw » December 21st, 2020, 4:44 pm

If you number the chicks consecutively, you can consider the odd numbered and even numbered ones independently.

An analysis using random numbers suggests 25.

AleisterCrowley wrote:But what of the ducks, Julian ?

I thought I would duck that question.


Julian F. G. W.

GoSeigen
Lemon Quarter
Posts: 4335
Joined: November 8th, 2016, 11:14 pm
Has thanked: 1583 times
Been thanked: 1561 times

Re: Chicks

#368469

Postby GoSeigen » December 21st, 2020, 5:28 pm

jfgw wrote:
GoSeigen wrote:Hmm, and just a comment, looks like others are treating the being-pecked events as independent. Looks fishy to me...

That did since occur to me. If one chick is not pecked, both chicks the other side of its neigbours will be.

What have fish got to do with it?


Julian F. G. W.


That's what I thought but I think my mind was wonky. I did a quick google and came up with "the expectation of the sum equals the sum of the expectations even if the events are not independent". Or something like that, it dredged up ancient memories of A level. Just a matter of time before Geng writes a ridiculously lucid summary of the maths.

Can I call him a good egg?

GS

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Chicks

#368695

Postby Gengulphus » December 22nd, 2020, 11:31 am

AsleepInYorkshire wrote:100 chicks sit peacefully in a circle in a barn. Each chick suddenly pecks the chick randomly once to its left or right. What is the expected number of unpecked chicks.

There's insufficient information to answer that question, in two different ways. In all that follows, I'll assume that the chicks are all facing the centre of the circle and are numbered clockwise around the circle, so that chick N pecking to its right means it pecks chick N-1 (with 1-1 wrapping around to 100) and chick N pecking to its left means it pecks chick N+1 (with 100+1 wrapping around to 1) - other assumptions don't change anything essential, they just create a messy set of "left"/"right" wording swaps depending on which way a chick is facing and whether the chicks are numbered clockwise or anticlockwise around the circle:

Firstly, as already mentioned in the thread, we're only told that the chicks' choices of pecking direction are made randomly, not that they're made independently of each other. If for example the mother hen says to her (rather implausibly) large number of offspring "I'm about to toss a coin - if it comes up heads, then you're all to peck to the right; if it comes up tails, you're all to peck to the left", and she then tosses a fair coin and the chicks all obey her (and know the difference between their left and their right!), then every chick's choice of pecking direction has been determined randomly. But there are only two possible results of the coin toss, and for both of them no chick is left unpecked, so the expected number of unpecked chicks is 0 in this case.

Secondly, even if the chicks' choices of pecking direction are made both randomly and independently of each other, we're not told that they choose the two directions with equal probabilities. If for example every chick makes their random choice by throwing a fair die and pecking to the left if a 6 is thrown and to the right otherwise, then each chick has a 5/6ths chance of being pecked by the chick on its left and an independent 1/6th chance of being pecked by the chick on its right, so a (1-5/6)*(1-1/6) = 5/36ths chance of remaining unpecked, and so the expected number of unpecked chicks is 100 * 5/36 = 13.888...

If the chicks' choices of pecking direction are made independently of each other, and all with equal 1/2 chances of being a leftwards peck and a rightwards peck, then as others have said, the chance of a chick remaining unpecked is (1-1/2)*(1-1/2) = 1/4, and so the expected number of unpecked chicks is 100 * 1/4 = 25.

GoSeigen wrote:I did a quick google and came up with "the expectation of the sum equals the sum of the expectations even if the events are not independent". Or something like that, it dredged up ancient memories of A level. Just a matter of time before Geng writes a ridiculously lucid summary of the maths.

Yes, that's exactly the mathematical result required to justify my "... and so the expected number of unpecked chicks is X" statements at the ends of the last two paragraphs of the previous section of this reply.

One does need to be careful about which pairs of events are independent of each other. The arguments in those paragraphs about the chance of a chick N remaining unpecked depend on chick N-1 not pecking to its left and chick N+1 not pecking to its right being independent events, which follows from the assumptions at the start of those paragraphs that the chicks' choices of pecking direction are made independently of each other. The final "... and so the expected number of unpecked chicks is X" statements follow from applying the result you've found to the number of unpecked chicks, which is the sum from N=1 to 100 of U(N), where U(N) = 1 if chick N is unpecked and 0 if it is pecked. As jfgw has observed, the event that U(N) = 1 is not independent of the events that U(N+2) and U(N-2) are 1, because both U(N) and U(N+2) depend on chick N+1's choice of pecking direction and both U(N) and U(N-2) depend on chick N-1's choice of pecking direction. But as the result you've found says, it doesn't depend on independence.

So one part of the argument does depend on "chick N-1 pecks to its right" and "chick N+1 pecks to its left" being independent events, which they are assumed to be in those arguments, and a later part of the argument does involve both "chick N+1 pecks to its right" and "chick N+1 pecks to its left" events, which are definitely not independent events, but doesn't care about that lack of independence (and similarly it involves both "chick N-1 pecks to its right" and "chick N-1 pecks to its left" events, but doesn't care that they're not independent of each other).

GoSeigen wrote:Can I call him a good egg?

Yes, I think you've just demonstrated that you're entirely capable of that feat! ;-)

Gengulphus

AsleepInYorkshire
Lemon Half
Posts: 7383
Joined: February 7th, 2017, 9:36 pm
Has thanked: 10514 times
Been thanked: 4658 times

Re: Chicks

#368700

Postby AsleepInYorkshire » December 22nd, 2020, 11:37 am

Gengulphus wrote:
AsleepInYorkshire wrote:100 chicks sit peacefully in a circle in a barn. Each chick suddenly pecks the chick randomly once to its left or right. What is the expected number of unpecked chicks.

There's insufficient information to answer that question, in two different ways. In all that follows, I'll assume that the chicks are all facing the centre of the circle and are numbered clockwise around the circle, so that chick N pecking to its right means it pecks chick N-1 (with 1-1 wrapping around to 100) and chick N pecking to its left means it pecks chick N+1 (with 100+1 wrapping around to 1) - other assumptions don't change anything essential, they just create a messy set of "left"/"right" wording swaps depending on which way a chick is facing and whether the chicks are numbered clockwise or anticlockwise around the circle:

Firstly, as already mentioned in the thread, we're only told that the chicks' choices of pecking direction are made randomly, not that they're made independently of each other. If for example the mother hen says to her (rather implausibly) large number of offspring "I'm about to toss a coin - if it comes up heads, then you're all to peck to the right; if it comes up tails, you're all to peck to the left", and she then tosses a fair coin and the chicks all obey her (and know the difference between their left and their right!), then every chick's choice of pecking direction has been determined randomly. But there are only two possible results of the coin toss, and for both of them no chick is left unpecked, so the expected number of unpecked chicks is 0 in this case.

Secondly, even if the chicks' choices of pecking direction are made both randomly and independently of each other, we're not told that they choose the two directions with equal probabilities. If for example every chick makes their random choice by throwing a fair die and pecking to the left if a 6 is thrown and to the right otherwise, then each chick has a 5/6ths chance of being pecked by the chick on its left and an independent 1/6th chance of being pecked by the chick on its right, so a (1-5/6)*(1-1/6) = 5/36ths chance of remaining unpecked, and so the expected number of unpecked chicks is 100 * 5/36 = 13.888...

If the chicks' choices of pecking direction are made independently of each other, and all with equal 1/2 chances of being a leftwards peck and a rightwards peck, then as others have said, the chance of a chick remaining unpecked is (1-1/2)*(1-1/2) = 1/4, and so the expected number of unpecked chicks is 100 * 1/4 = 25.

GoSeigen wrote:I did a quick google and came up with "the expectation of the sum equals the sum of the expectations even if the events are not independent". Or something like that, it dredged up ancient memories of A level. Just a matter of time before Geng writes a ridiculously lucid summary of the maths.

Yes, that's exactly the mathematical result required to justify my "... and so the expected number of unpecked chicks is X" statements at the ends of the last two paragraphs of the previous section of this reply.

One does need to be careful about which pairs of events are independent of each other. The arguments in those paragraphs about the chance of a chick N remaining unpecked depend on chick N-1 not pecking to its left and chick N+1 not pecking to its right being independent events, which follows from the assumptions at the start of those paragraphs that the chicks' choices of pecking direction are made independently of each other. The final "... and so the expected number of unpecked chicks is X" statements follow from applying the result you've found to the number of unpecked chicks, which is the sum from N=1 to 100 of U(N), where U(N) = 1 if chick N is unpecked and 0 if it is pecked. As jfgw has observed, the event that U(N) = 1 is not independent of the events that U(N+2) and U(N-2) are 1, because both U(N) and U(N+2) depend on chick N+1's choice of pecking direction and both U(N) and U(N-2) depend on chick N-1's choice of pecking direction. But as the result you've found says, it doesn't depend on independence.

So one part of the argument does depend on "chick N-1 pecks to its right" and "chick N+1 pecks to its left" being independent events, which they are assumed to be in those arguments, and a later part of the argument does involve both "chick N+1 pecks to its right" and "chick N+1 pecks to its left" events, which are definitely not independent events, but doesn't care about that lack of independence (and similarly it involves both "chick N-1 pecks to its right" and "chick N-1 pecks to its left" events, but doesn't care that they're not independent of each other).

GoSeigen wrote:Can I call him a good egg?

Yes, I think you've just demonstrated that you're entirely capable of that feat! ;-)

Gengulphus

Highlighted in red above as the most accepted correct answer, albeit there's sufficient information above to suggest that the enjoyment factor was reasonable and other answers may well be correct too.

As a total aside may I ask if any of your Math's teachers remained in post for more than a year :shock: [Sorry my humour's as good as my maths ... eek :oops: ]

Merry Xmas

AiY

UncleEbenezer
The full Lemon
Posts: 10658
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1451 times
Been thanked: 2956 times

Re: Chicks

#368755

Postby UncleEbenezer » December 22nd, 2020, 1:23 pm

Gengulphus wrote:There's insufficient information to answer that question, in two different ways.


Nit like you to peck those nots. Only yesterday it was:

A spoiler that assumes the usual conventions for such puzzles, namely that we're working in decimal and leading zeros are not allowed (other than for the number 0 itself):


I guess that was to distinguish your solution from my simple one, and Julian's expression of it as a big number?

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Chicks

#369025

Postby Gengulphus » December 23rd, 2020, 9:59 am

UncleEbenezer wrote:
Gengulphus wrote:There's insufficient information to answer that question, in two different ways.

Nit like you to peck those nots. Only yesterday it was:

A spoiler that assumes the usual conventions for such puzzles, namely that we're working in decimal and leading zeros are not allowed (other than for the number 0 itself):

I guess that was to distinguish your solution from my simple one, and Julian's expression of it as a big number?

It was actually because (a) I'd been sort-of-invited by GoSeigen to comment on the maths, and mathematicians tend to want more assumptions to be explicitly stated and not left to 'usual conventions' than puzzle-setters; (b) alphametics have a very well-established and widely-known set of 'usual conventions', probability puzzles much less so. The reason that probability puzzles often produce quite a lot of disagreement about their answers is not just that many people don't understand probability, but quite often also that the puzzle leaves assumptions unstated, people fill in the missing assumptions in different ways without particularly realising that they're doing so, and arrive at different answers as a result. The "Monty Hall problem" is an example - different assumptions about the game host's behaviour quite correctly lead to different answers. (I'm mentioning the "Monty Hall problem" with some hesitation, because it has a habit of 'hijacking' discussions in which it comes up. If anyone wants to know what it is, look it up on Wikipedia; if anyone wants to discuss it, please start a new thread about it to avoid such 'hijacking'!)

Gengulphus

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Chicks

#369042

Postby Gengulphus » December 23rd, 2020, 10:36 am

AsleepInYorkshire wrote:As a total aside may I ask if any of your Math's teachers remained in post for more than a year :shock: [Sorry my humour's as good as my maths ... eek :oops: ]

The answer is "yes" for my maths teacher in the last few years of secondary school - but you've got to take into account that he was a mathematician! ;-) Before that, I don't really remember my maths teachers and quickly lost track of them, due to moves between schools in different countries.

And by the way, I'm by no means the most pedantic of mathematicians. As an illustrative puzzle, when I was in the university maths department, it would not infrequently happen that someone would make a comment such as "I wonder whether that depends on the axiom of choice or not?" and instantly get an answer that was both undoubtedly correct and thoroughly unhelpful. What was that answer? (To answer this, you don't need to know anything about the axiom of choice other than that some maths results depend on it and others don't.)

Gengulphus

UncleEbenezer
The full Lemon
Posts: 10658
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1451 times
Been thanked: 2956 times

Re: Chicks

#369060

Postby UncleEbenezer » December 23rd, 2020, 11:18 am

Gengulphus wrote:The "Monty Hall problem"


I was half-tempted to post a quip about that being the Axiom of Choice of probability puzzles. Then I read your next post: evidently both were in your mind!

I think both have featured on this very board before.

p.s.Regarding those alphametics, first time cinelli posted one here I had to figure out those "conventions" about unique digits/etc. If they ever appeared in my youthful experience of Martin Gardner or similar, they must've held insufficient interest to stick in the mind.

bluedonkey
Lemon Quarter
Posts: 1783
Joined: November 13th, 2016, 3:41 pm
Has thanked: 1383 times
Been thanked: 646 times

Re: Chicks

#369099

Postby bluedonkey » December 23rd, 2020, 12:51 pm

"undoubtedly correct and thoroughly unhelpful" - sounds like a budding accountant.


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 1 guest