# Married couples Around a Table

#week6 Practice20 PB3 #3. Married couples.

A group of men and women sit in a circle.

There are 20 chairs in the circle, and 10 pairs of married individuals.

What is the expected number of men who are sitting

directly across the room from their (respective) wives?

Couples have the same Letter

#Geogebra Script # copy paste this code line by line in "input" # or you can copy paste it in an "ok" button #( before last icon menu at window top, put it in graphic window,unselect the menu-> click on arrow, # then click on it) it will execute the code n=Slider(2,20, 2 ) setvalue(n,20) CircularTable: Circle((0, 0), 1) CouplesPoints = Sequence(e^(ί 2 π k / n), k, 0, n-1) Couples_{names}={"A", "A", "B", "B", "C", "C", "D", "D", "E", "E", "F", "F", "G", "G", "H", "H", "I", "I", "J", "J"} Couples_{random} = Shuffle( Couples_{names}) RandomNames=Sequence(Text(Element(Couples_{random}, i), Element(CouplesPoints, i) + (-0.05, -0.05)), i, 1, Length(CouplesPoints)) Ones=Sequence(IF(Element(Couples_{random}, i)==Element(Couples_{random}, mod(i+n/2,n)),1,0), i, 1, Length(CouplesPoints)) # this below neccessary to be present before the Button Reset Code execution Count=0 EX=0 S=0 # this code below in "Scripting" -> "On Click" Tab of the "Random" Button # random button is just an ok button which has been renamed Couples_{random} = Shuffle( Couples_{names}) Count=Count +1 S= Sum(Ones)+S EX=S/Count # this code below in "Scripting" -> "On Click" Tab of the "RAZ" Button # RAZ button is just an ok button which has been renamed Count=0 EX=0 S=0Illustration for Exercice from EDX.org PurdueX: 416.1x Probability:

Basic Concepts & Discrete Random Variables

week6 Practice20 Problem numero 3

I am supposed to find :

3. Married couples.

Let Xj indicate if the jth man sits across from his wife. Then E(Xj) = 1=19, since no

matter where the man sits, his wife can sit in 19 other possible chairs, only 1 of which is

directly across from him. Thus the expected number of men sitting across from their wives

is E(X1 + .... + X10) = E(X1) + ... + E(X10) = 1/19 + ..... + 1/19 = 10/19.

but I find Ex=1 !!, what is wrong in my code ?

oops ok ! forgot to divide by 2 the number of ones I found in sum !!

S= Sum(Ones)/2+S

Sorry !!!

no double count !!

Sorry

In spanish

el suceso "estar sentado frente a su esposa" no es independiente de casos anteriores, pues si ya hay 19 sentados frente a su esposa el ultimo tendría probabilidad 1. Creo que el calculo de la probabilidad 10/19 es erróneo. tampoco tengo claro si se exige que cada hombre esté sentado frente a una mujer.

Hi Math Magic

that's what I thought, that we could not add the means because the probabilities are not independent,

the more paired pairs are, the greater the chance that the others will be.

but yet the test with Geogebra seems to give this value 10/19.

is it possible to put multiple statements in the Sequences command ?

I would have liked to add a "EventsNumber" slider from 1 to 500 to execute shuffle and count a lot of times.

but when we think about each man individually it's true that he has 1/19 to find his spouse in front of him.

it is confusing.

but I also know that in the field of probabilities, one must beware of one's intuitions!

Loading...Comments have been locked on this page!