Malaika Wauters Math 11 - Lab 4
pdf
keyboard_arrow_up
School
University of California, San Diego *
*We aren’t endorsed by this school
Course
11
Subject
Mathematics
Date
May 30, 2024
Type
Pages
6
Uploaded by MegaRose1330
Malaika Wauters
Math 11
Denise Rava
Lab 4: Simulating Bernoulli Trials
1.
How many heads did you get in each of the four experiments?
First trial - 1 head
Second trial - 3 heads
Third trial - 3 heads
Fourth trial - 2 heads
2.
What is the probability of getting zero heads in six tosses? What is the probability of
getting exactly two heads in six tosses?
a.
0.03125
b.
0.3125
3.
In your simulation, how many times out of 1000 were there zero heads in the six tosses?
How many times were there two heads? Include a histogram of your simulation results in
your write-up along with your answers to these questions. As always, remember to make
sure the axes are appropriately labeled.
a.
As depicted in the histogram above and according to the simulation ran through
Minitab, there were only 23 times where I summed 0 heads in total versus a high
293 times where 2 heads were a result of the toss.
4.
Compare your answers to the previous two questions. In the 1000 simulations, did you
get zero heads about as many times as you expected (remember that the number of times
you expect to get zero heads is the number of simulations times the probability of getting
zero heads in one simulation)? What about two heads?
a.
The expected values for the trials don’t exactly line up to be completely accurate
with the data that I yielded yet itr is not too far off and it can be concluded that
with even more than 1000 trials, the data that I should yield would more
accurately resemble the expected value. I had only 23 trials in which there were to
be 0 heads while it should be approximately 31.25 times. And again, in regards to
discovering 2 heads as a result, it should have happened 312.5 times yet it only
occurred 293 times.
5.
First, simulate tossing a coin 10 times and counting the number of heads. Do 1000
repetitions of this procedure (so you will generate 1000 numbers, each a binomial random
variable with
n
= 10 and
p
= 1/2). Present a histogram of the results.
6.
Find the mean and standard deviation of the 1000 numbers that you got. (Remember you
can get this using
Stat --> Basic Statistics --> Display Descriptive Statistics
.) Are these
numbers close to the expected value and standard deviation of a binomial random
variable with
n
= 10 and
p
= 1/2?
a.
Mean = 5.479
b.
StDev = 1.641
c.
By binomial distribution, E[
X
] =
np
and SD(
X
) = (
np
(1-
p
))
½
So the expected value would be half of 10, 10(½) = 5
And the expected StDev would be the square root of 10(½ )(½ ) = 1.581
d.
Evidently, the values that were yielded, also known as the actual observed values
are very close to the expected values (5.479 - 5 = 0.479) and (1.641-1.581 = 0.06)
7.
Now simulate tossing a coin 100 times. As before, do 1000 repetitions of this procedure,
and present the results in a histogram. Based on the histogram, if you tossed a coin 100
times, would you be surprised if the number of heads were 5 more (or 5 fewer) than
expected? Would you be surprised if the number of heads were 20 more (or 20 fewer)
than expected?
8.
Next simulate tossing coins 1000 and 10,000 times. As before, do 1000 repetitions of
each procedure, and make two histograms. If you tossed a coin 10,000 times, would you
be surprised if the number of heads were 5 more (or 5 fewer) than expected? Would you
be surprised if the number of heads were 20 more (or 20 fewer) than expected?
a.
After flipping the coin 10,000 times I would expect to have plus or minus 5, or
even perhaps plus or minus 20 heads that I initially predicted because of the
increase in the standard deviation and spread of the data, although it would be
slightly less likely to expect a variation of plus or minus 20 heads as a result
because that is a bigger difference.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
9.
Based on your observations above, when the number of tosses increases, does the
difference between the actual number of heads and the expected number of heads tend to
get larger or smaller?
a.
Continuing to build on the aforementioned observations, as the number of tosses
and trials increases, the difference between the expected versus actual value of
heads yielded as a result opposed to tails tends to increase.
10. Now consider not the number of heads but the fraction of heads. The fraction of heads is
the number of heads divided by the total number of tosses, so if 60 out of 100 tosses are
heads, the fraction of heads is 60/100 = .60. Present a side-by-side boxplot of the
fractions of heads that you got in 10, 100, 1000, and 10,000 tosses.
11. The Law of Large Numbers states that as the number of tosses gets larger, the fraction of
heads should get closer and closer to 1/2. Examine the side-by-side boxplots that you
made for question 10. Are your simulation results in agreement with the Law of Large
Numbers? Explain your answer.
a.
As X increases, the IQR decreases alongside the decrease of the standard
deviation of the data, therefore the simulation is in agreement with the law of
large numbers, and furthermore, the fraction should more closely resemble and
approach ½.
12. If
X
denotes the number of heads in
n
tosses of a coin, what is the standard deviation of
the random variable
X
? Does this standard deviation get larger or smaller when
n
gets
larger?
a.
Given that X is the number of heads in
n
tosses
Then, StDev (
X
) = (
n(X/n)
((n-x)/n))
½
b.
As the n, the number of trials or tosses, increases, the spread of the data, the
standard deviation, naturally increases as well. Further, as previously discussed in
question 9, as the number of tosses and trials increases, the difference between the
expected versus actual value of heads yielded as a result opposed to tails tends to
increase; meaning the spread of the data increases.
13. Note that if
X
denotes the number of heads in
n
tosses of a coin, then
X/n
denotes the
fraction of heads. What is the standard deviation of the fraction of heads? Does this
standard deviation get larger or smaller as
n
gets larger? Relate this to the observations
that you made in response to question 11.
a.
Given that X/n = fraction of heads
Then the StDev (X/n) = (
n(X/n)
((n-x)/n))
½
b.
The previously mentioned notion in question 11 that explains how as X increases,
the IQR decreases alongside the decrease of the standard deviation of the data,
corresponds with the circumstances of part a above because if n increases (as the
denomination of the fraction of heads), the standard deviation will decrease.
14. Generate 1000 random numbers each from the binomial distribution with
n
= 20 and
p
=
.5, from the binomial distribution with
n
= 20 and
p
= .8, and from the binomial
distribution with
n
= 20 and
p
= .95. Show the histograms and describe the shapes of the
three distributions. Are the shapes of the distributions quite different, or do they look
approximately the same?
a.
There is obvious variation in the distribution shapes of the three histograms
depicted above. However we can conclude that as probability of success
decreases, the distribution would be skewed to the right because as p increases
towards one it becomes skewed to the left. Evidently as p approximates closer to
0.5, the distribution is pretty much symmetrical.
15. Generate 1000 random numbers each from the binomial distribution with
n
= 2000 and
p
= .5, from the binomial distribution with
n
= 2000 and
p
= .8, and from the binomial
distribution with
n
= 2000 and
p
= .95. Show the histograms and describe the shapes of
the three distributions. This time, are the shapes of the distributions approximately the
same? What do you conclude about how the shape of the distribution depends on the
number of trials?
a.
Although the three histograms above are all symmetric and are all seemingly very
similar, it is important to consider that the scales of the axes are different and the
data sets are symmetrically centered around different values. As the number of
trials increases, given that the p value moves away from 0.5, the distribution
should become more symmetrical.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help