This project will use your calculator's ability to generate random numbers.
To generate random whole numbers from lower to upper, the
keystroke sequence is: MATH >>> 5: randInt(lower,
upper, [number trials]). For example randInt(1,6) generates
a random "die" from 1 to six. Press ENTER repeatedly for several
trials. To automatically simulate 100 trials and store in a list, randInt(1,6,100)
STO L1 stores 100 simulations in the list L1.
**Set different seed values for the random number generator by entering
different values for 257 in the following: 257
STO rand.
I. Use simulation to find the expected size of a family
This part uses the random number generator
to simulate having children, use 1 as a boy and 2 as a girl. The
goal is to simulate the number of children a family must have at minimum
to have a child of each sex, using randInt(1,2). For each
family, generate random numbers until you have one child of each
sex, and record the total number of children. For example, the sequence
1 1 2 has a child of each sex and would record as 3.
The sequence 2 2 2 2 1 would record
as 5. Simulate 150 families, recording the total number of children
in the family each time. I would recommend that you press CLEAR
between each "family" to start the next "family" at the top of the screen
a) Family #
Number of Children
1
2
3
: .
150
b) Enter the150 numbers into a list in your calculator.
Find the average of these 150 numbers, i.e., the mean value for the number
of children in a family to have one of each gender.
c) Create a probability distribution table for the number
of children in a family.
X
P(X)
2
3
i) What is the probability that the family has exactly 2 children?
4
ii) What is the probability that the family has at most 4 children?
5
iii) What is the probability that the family has 5 or more children?
...
II. Use simulation to find probabilities associated with
"THE BIRTHDAY PROBLEM"
One classic exercise in probability is the
birthday problem, in which we find the probability that in a class
of students, at least 2 students have the same birthday. Ignore
leap years to perform simulations of the experiment with class sizes of
Different groups in class will be assigned n = 25 or 30 or 35 or
40.
Set a random seed (?? STO rand). Birth dates are represented as numbers from 1 to 365. To simulate a class of 30 (or whichever n you've been assigned), generate 30 "birth dates" and store them in a list. At the home screen randInt(1,365,30) STO L1. Then sort the list to put the birth dates in order so that duplicate birth dates can easily be spotted. You can go to the editor to view the sorted list, or press L1 at the home screen and to see the list.
**To speed up the repetitions of several classes of students put
the commands described above "together" with colons:
randInt(1,365,n) STO L1:SortA(L1):L1
right arrow to see if any duplicates and record, then press ENTER to
do the whole process again. Simulate 100 classes of size n.
a) Record each of your 100 simulations as yes/no
or some way.
b) Find the probability that in a group of n people
that at least two people have the same birthday
by counting how many of
the 100 sets did have duplicates.