Introduction to Probability with Mathematica Second Edition Kevin J. Hastings download
Introduction to Probability with Mathematica Second Edition Kevin J. Hastings download
https://ebookgate.com/product/introduction-to-probability-with-
mathematica-second-edition-kevin-j-hastings/
https://ebookgate.com/product/introduction-to-probability-second-
edition-george-g-roussas/
ebookgate.com
https://ebookgate.com/product/an-introduction-to-programming-with-
mathematica-3rd-ed-edition-paul-r-wellin/
ebookgate.com
https://ebookgate.com/product/introduction-to-probability-and-
statistics-second-edition-revised-and-expanded-edition-giri/
ebookgate.com
https://ebookgate.com/product/introduction-to-algebra-second-edition-
peter-j-cameron/
ebookgate.com
Introduction to Algebra Second Edition Peter J. Cameron
https://ebookgate.com/product/introduction-to-algebra-second-edition-
peter-j-cameron-2/
ebookgate.com
https://ebookgate.com/product/crc-standard-curves-and-surfaces-with-
mathematica-second-edition-david-h-von-seggern/
ebookgate.com
https://ebookgate.com/product/introduction-to-probability-2nd-edition-
dimitri-p-bertsekas/
ebookgate.com
https://ebookgate.com/product/introduction-to-probability-and-
statistics-thirteenth-edition-william-mendenhall/
ebookgate.com
https://ebookgate.com/product/introduction-to-probability-models-9th-
edition-sheldon-m-ross/
ebookgate.com
INTRODUCTION TO
Probability with
Mathematica®
Second Edition
TEXTBOOKS in MATHEMATICS
Series Editor: Denny Gulick
PUBLISHED TITLES
INTRODUCTION TO
Probability with
Mathematica®
Second Edition
Kevin J. Hastings
Knox College
Galesburg, Illinois, U.S.A.
Chapman & Hall/CRC
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
QA273.19.E4H37 2010
519.20285’536--dc22 2009030737
Kevin J. Hastings
Note on the Electronic Version and the
KnoxProb7Utilities Package
The CD that accompanies this book contains a Mathematica notebook for each text
section. Copyright law forbids you from distributing these notebooks without the express
permission of the publisher, just as with the print version. The print text was made without
color, by publisher specification, but color effects are included into the electronic version.
Otherwise the electronic notebooks are identical to the print version. When a notebook is
first loaded you can select the Evaluate Initialization Cells command under the Evaluation
menu to reproduce the output. The look of the notebooks in the front end will depend on
what style sheet you are using; I have applied the Book/Textbook stylesheet to these files.
Also on the disk are two packages: the KnoxProb7 Utilities package for users of
version 7 of Mathematica, and KnoxProb6`Utilities` for users of version 6. Move the
appropriate folder into the AddOns\ExtraPackages subdirectory of your main Mathematica
directory in order to allow the electronic book to run. The electronic files are written for
version 7, so the Needs commands in the notebooks should be modified to load Knox-
Prob6`Utilities` instead of KnoxProb7`Utilities` for Mathematica 6 users. The main differ-
ences between the two Utilities versions are: (1) the Histogram command that I had written
for the version 6 package is eliminated in the version 7 package because Wolfram Research
included its own suitable Histogram command into the kernel in version 7; and (2) the
ProbabilityHistogram command had to be rewritten for version 7 due to the elimination of
the BarCharts package that it had relied on. Both packages are updates of those in the
KnoxProb`Utilities` package that was available for the first edition of the book, adapting to
the major changes in the structure of Mathematica that happened as it went into version 6.0.
Among the most important changes for our purposes was that many statistical commands
that had previously been contained in external packages were moved into the kernel, so that
these packages no longer needed to be loaded. The electronic book has been subjected to a
lot of testing, and it should operate well.
Table of Contents
Chapter 1 – Discrete Probability
1.1 The Cast of Characters 1
1.2 Properties of Probability 10
1.3 Simulation 23
1.4 Random Sampling 33
Sampling in Sequence without Replacement 34
Sampling in a Batch without Replacement 38
Other Sampling Situations 42
1.5 Conditional Probability 48
Multiplication Rules 51
Bayes' Formula 56
1.6 Independence 62
Chapter 2 – Discrete Distributions
2.1 Discrete Random Variables, Distributions,
and Expectations 73
Mean, Variance, and Other Moments 79
Two Special Distributions 85
2.2 Bernoulli and Binomial Random Variables 94
Multinomial Distribution 102
2.3 Geometric and Negative Binomial Random Variables 107
2.4 Poisson Distribution 115
Poisson Processes 120
2.5 Joint, Marginal, and Conditional Distributions 124
2.6 More on Expectation 136
Covariance and Correlation 140
Conditional Expectation 148
Chapter 3 – Continuous Probability
3.1 From the Finite to the (Very) Infinite 159
3.2 Continuous Random Variables and Distributions 171
Joint, Marginal, and Conditional Distributions 178
3.3 Continuous Expectation 192
Chapter 4 – Continuous Distributions
4.1 The Normal Distribution 207
4.2 Bivariate Normal Distribution 225
Bivariate Normal Density 229
Marginal and Conditional Distributions 235
4.3 New Random Variables from Old 246
C.D.F. Technique and Simulation 247
Moment–Generating Functions 252
4.4 Order Statistics 259
4.5 Gamma Distributions 273
Main Properties 273
The Exponential Distribution 277
4.6 Chi–Square, Student’s t, and F–Distributions 281
Chi–Square Distribution 282
Student's t–Distribution 289
F–Distribution 293
4.7 Transformations of Normal Random Variables 300
Linear Transformations 301
Quadratic Forms in Normal Random Vectors 306
Chapter 5 – Asymptotic Theory
5.1 Strong and Weak Laws of Large Numbers 313
5.2 Central Limit Theorem 320
Chapter 6 – Stochastic Processes and Applications
6.1 Markov Chains 329
Short Run Distributions 331
Long Run Distributions 334
Absorbing Chains 338
6.2 Poisson Processes 344
6.3 Queues 352
Long Run Distribution of System Size 353
Waiting Time Distribution 358
Simulating Queues 359
6.4 Brownian Motion 365
Geometric Brownian Motion 373
6.5 Financial Mathematics 379
Optimal Portfolios 380
Option Pricing 385
Appendices
A. Introduction to Mathematica 395
B. Glossary of Mathematica Commands for Probability 423
C. Short Answers to Selected Exercises 431
References 445
Index 447
CHAPTER 1
DISCRETE PROBABILITY
1
2 Chapter 1 Discrete Probability
yourself in a kind of workshop, with Mathematica and your own insight and love of
experimentation as your most powerful tools. I caution you against depending too much on
the machine, however. Much of the time, traditional pencil, paper, and brainpower are what
you need most to learn. What the computer does, however, is open up new problems, or let
you get new insights into concepts. So we will be judiciously blending new technology with
traditionally successful pedagogy to enable you to learn effectively. Consistent themes will
be the idea of taking a sample randomly from a larger universe of objects in order to get
information about that universe, and the computer simulation of random phenomena to
observe patterns in many replications that speak to the properties of the phenomena.
The cast of characters in probability whose personalities we will explore in depth in
the coming chapters include the following six principal players: (1) Event; (2) Sample
Space; (3) Probability Measure; (4) Random Variable; (5) Distribution; and (6) Expectation.
The rest of this section will be a brief intuitive introduction to these six.
Most of the time we are interested in assessing likelihoods of events, that is, things
that we might observe as we watch a phenomenon happen. The event that a national chain's
bid to acquire a local grocery store is successful, the event that at least 10 patients arrive to
an emergency room between 6:00 and 7:00 AM, the event that a hand of five poker cards
forms a straight, the event that we hold the winning ticket in the lottery, and the event that
two particular candidates among several are selected for jury duty are just a few examples.
They share the characteristic that there is some uncertain experiment, sampling process, or
phenomenon whose result we do not know "now". But there is a theoretical "later" at which
we can observe the phenomenon taking place, and decide whether the event did or didn't
occur.
An outcome (sometimes called a simple event) is an event that cannot be broken
down into some combination of other events. A composite event is just an event that isn't
simple, that is, it has more than one outcome. For instance the event that we are dealt a poker
hand that makes up a straight is composite because it consists of many outcomes which
completely specify the hand, such as 2 through 6 of hearts, 10 through ace of clubs, etc.
This is where the sample space makes its entry: the sample space is the collection of
all possible outcomes of the experiment or phenomenon, that is all possible indecomposable
results that could happen. For the poker hand example, the sample space would consist of
all possible five-card hands. In specifying sample spaces, we must be clear about assump-
tions; for instance we might assume that the order in which the cards were dealt does not
matter, and we cannot receive the same card twice, so that the cards are dealt without
replacement.
Activity 1 How can you characterize the sample space for the grocery store example?
Make up your own random phenomenon, informally describe the sample space, and give
examples of events.
1.1 The Cast of Characters 3
Activity 2 In the emergency room example above, is the event that was described an
outcome or a composite event? If that event is composite, write down an example of an
outcome relating to that phenomenon.
In random phenomena, we need a way of measuring how likely the events are to
occur. This may be done by some theoretical considerations, or by experience with past
experiments of the same kind. A probability measure assigns a likelihood, that is a number
between 0 and 1, to all events. Though we will have to be more subtle later, for now we can
intuitively consider the extremes of 0 and 1 as representing impossibility and complete
certainty, respectively.
Much of the time in probability problems, probability measures are constructed so
that the probability of an event is the "size" of the event as a proportion of the "size" of the
whole sample space. "Size" may mean different things depending on the context, but the two
most frequent usages are cardinality, that is number of elements of a set, and length (or area
in two dimensions). For example, if you roll a fair die once, since there are six possible faces
that could land on top, the sample space is 1, 2, 3, 4, 5, 6. Since three of the faces are odd,
it seems reasonable that the probability that an odd number is rolled is 3/6. Size means
length in the following scenario. Suppose that a real number is to be randomly selected in
the interval 0, 4. This interval is the sample space for the random phenomenon. Then the
probability that the random real number will be in the interval 1, 3 is 2 4 1 2, which is
the length of the interval 1, 3 divided by the length of the whole sample space interval.
The first two chapters will concentrate on discrete probability, in which counting the
number of elements in sets is very important. We will leave much of the detail for later
sections, except to remind you of the intuitively obvious multiplication principle for
counting. If outcomes of a random experiment consist of two stages, then the total number of
outcomes of the experiment is the number of ways the first stage can occur times the number
of ways that the second can occur. This generalizes to multiple stage experiments. For
instance, if a man has 3 suits, 6 shirts, and 4 ties, and he doesn't care about color coordina-
tion and the like, then he has 3 6 4 72 possible outfits.
It is possible to experimentally estimate a probability by repeating the experiment
over and over again. The probability of the event can be estimated by the number of times
that it occurs among the replications divided by the number of replications. Try this
exercise. In the KnoxProb7`Utilities` package that you should have installed is a Mathemat-
ica command called
DrawIntegerSample[a, b, n]
4 Chapter 1 Discrete Probability
which outputs a sequence of n numbers drawn at random, without reusing numbers previ-
ously in the sequence, from the positive integers in the range a, ... , b. (You should be sure
that the package has been loaded into the ExtraPackages subdirectory within the Mathemat-
ica directory you are using on your computer.) First execute the command to load the
package, then try repeating the experiment of drawing samples of two numbers from
1, ... , 5 a large number of times. I have shown one such sample below. Keep track of how
frequently the number 1 appears in your samples. Empirically, what is a good estimate of the
probability that 1 is in the random sample of size two? Talk with a group of your classmates,
and see if you can set up a good theoretical foundation that supports your conclusion. (Try to
specify the sample space of the experiment.) We will study this type of experiment more
carefully later in this chapter. Incidentally, recall that Mathematica uses braces { } to
delineate sequences as well as unordered sets. We hope that the context will make it clear
which is meant; here the integer random sample is assumed to be in sequence, so that, for
example, 1, 3 is different from 3, 1.
Needs"KnoxProb7`Utilities`"
DrawIntegerSample1, 5, 2
1, 3
We are halfway through our introduction of the cast of characters. Often the outc-
omes of a random phenomenon are not just numbers. They may be sequences of numbers as
in our sampling experiment, or even non-numerical data such as the color of an M&M that
we randomly select from a bag. Yet we may be interested in encoding the simple events by
single numbers, or extracting some single numerical characteristic from more complete
information. For example, if we are dealt a five card hand in poker, an outcome is a full
specification of all five cards, whereas we could be interested only in the number of aces in
the hand, which is a numerical valued function of the outcome. Or, the sample space could
consist of subjects in a medical experiment, and we may be interested in the blood sugar
level of a randomly selected subject. Such a function for transforming outcomes to numerical
values is called a random variable, the fourth member of our cast of characters. Since the
random variable depends on the outcome, and we do not know in advance what will happen,
the value of the random variable is itself uncertain until after the experiment has been
observed.
Activity 3 Use DrawIntegerSample again as below to draw samples of size five from a
population of size 50. Suppose we are interested in the random variable which gives the
minimum among the members of the sample. What values of this random variable do
you observe in several replications?
1.1 The Cast of Characters 5
The cell below contains a command I have called SimulateMinima for observing a
number m of values of the minimum random variable from Activity 3. Read the code
carefully to understand how it works. An integer sample is drawn from the set
{1,2,...,popsize}, and then its minimum is taken. The Table command assembles a list of m
of these minima. To get an idea of the pattern of those sample minima, we plot a graph
called a histogram which tells the proportion of times among the m replications of the
experiment that the sample minimum fell into each of a given number of categories. The
Histogram command is in the kernel in Mathematica 7. Its exact syntax is
where the latter two arguments are optional. (See the help documentation, the note in the
preface, and the appendix on Mathematica commands for version 6 of Mathematica and the
KnoxProb6`Utilities` package.) The binspecifications argument can be set to be a number
for a desired number of categories, or it can be set to a list d w for a desired category width.
The third argument can be set to "Count," "Probability," or "ProbabilityDensity," respec-
tively, to force the bar heights to be freqencies, relative frequencies, or relative frequencies
divided by category widths. One output cell is shown in Figure 1 using 100 replications, six
histogram rectangles, and using samples of size 5 from {1, ... , 50}. You should reexecute
several times to see whether your replications give similar histograms. Should they be
identical to this one? Why or why not? (If you want to suppress the list of minima and get
only the histogram, put a semicolon between the SimulateMinima and Histogram
commands.)
35
30
25
20
15
10
5
5 10 15 20 25 30
Figure 1.1 - Sample histogram of minimum of five values from 1, 2, ... , 50
The histogram for the sample minimum that we just saw, together with your experi-
ments, hints at a very deep idea, which is the fifth member of our cast. A random variable
observed many times will give a list of values that follows a characteristic pattern, with some
random variation. The relative frequencies of occurrence (that is the number of occurrences
divided by the number of replications) of each possible value of the random variable, which
are the histogram rectangle heights, will stabilize around some theoretical probability. Much
as a probability measure can be put on a sample space of simple events, a probability
distribution can be put on the collection of possible values of a random variable. To cite a
very simple example, if 1/3 of the applicants for a job are men and 2/3 are women, if one
applicant is selected randomly, and if we define a random variable
1 if applicant is a man
X
0 if applicant is a woman
then the two possible values of X are 1 and 0, and the probability distribution for this X gives
probability 1/3 to value 1 and 2/3 to value 0.
The last member of our cast is expectation or expected value of a random variable.
Its purpose is to give a single number which is an average value that the random variable can
take on. But if these possible values of the random variable are not equally likely, it doesn't
make sense to compute the average as a simple arithmetical average. For example, suppose
the number of 911 emergency calls during an hour is a random variable X whose values and
probability distribution are as in the table below.
1.1 The Cast of Characters 7
value of X 2 4 6 8
probability 1 10 2 10 3 10 4 10
What could we mean by the average number of calls per hour? The simple arithmetical
average of the possible values of X is (2+4+6+8)/4 = 5, but 6 and 8 are more likely than 2
and 4, so they deserve more influence. In fact, the logical thing to do is to define the
expected value of X, denoted by E[X], to be the weighted average of the possible values,
using the probabilities as weights:
1 2 3 4 60
EX 2 4 6 8 6
10 10 10 10 10
We will be looking at all of our characters again in a more careful way later, but I
hope that the seeds of intuitive understanding have been planted. You should reread this
introductory section from time to time as you progress to see how the intuition fits with the
formality.
Exercises 1.1
1. Most state lotteries have a version of a game called Pick 3 in which you win an amount,
say $500, if you correctly choose three digits in order. Suppose that the price of a Pick 3
ticket is $1. There are two possible sample spaces that might be used to model the random
experiment of observing the outcome of the Pick 3 experiment, according to whether the
information of the winning number is recorded, or just the amount you won. Describe these
two sample spaces clearly, give examples of outcomes for both, and describe a reasonable
probability measure for both.
2. A grand jury is being selected, and there are two positions left to fill, with candidates A,
B, C, and D remaining who are eligible to fill them. The prosecutor decides to select a pair
of people by making slips of paper with each possible pair written on a slip, and then
drawing one slip randomly from a hat. List out all outcomes in the sample space of this
random phenomenon, describe a probability measure consistent with the stated assumptions,
and find the probability that A will serve on the grand jury.
3. In an effort to predict performance of entering college students in a beginning mathemat-
ics course on the basis of their mathematics ACT score, the following data were obtained.
The entries in the table give the numbers of students among a group of 179 who had the
indicated ACT score and the indicated grade.
Grade
A B C D F
23 2 5 16 31 3
ACT 24 6 8 12 15 2
25 7 10 15 6 1
26 8 15 13 4 0
8 Chapter 1 Discrete Probability
(a) A student is selected randomly from the whole group. What is the probability that this
student has a 25 ACT and received a B? What is the probability that this student received a
C? What is the probability that this student has an ACT score of 23?
(b) A student is selected randomly from the group of students who scored 24 on the ACT.
What is the probability that this student received an A?
(c) A student is selected randomly from the group of students who received B's. What is the
probability that the student scored 23 on the ACT? Is it the same as your answer to the last
question in part (a)?
4. Find the sample space for the following random experiment. Four people labeled A, B, C,
and D are to be separated randomly into a group of 2 people and two groups of one person
each. Assume that the order in which the groups are listed does not matter, only the contents
of the groups.
5. Consider the experiment of dealing two cards from a standard 52 card deck (as in black-
jack), one after another without replacing the first card. Describe the form of all outcomes,
and give two examples of outcomes. What is the probability of the event "King on 1st card?"
What is the probability of the event "Queen on 2nd card?"
6. In the Pick 3 lottery example of Exercise 1, consider the random variable X that gives the
net amount you win if you buy one ticket (subtracting the ticket price). What is the probabil-
ity distribution of X? What is the expected value of X?
a X
b 0
c
d 1
e
f
Exercise 7
7. An abstract sample space has outcomes a, b, c, d, e, and f as shown on the left in the
figure. Each outcome has probability 1/6. A random variable X maps the sample space to the
set {0,1} as in the diagram. What is the probability distribution of X? What is the expected
value of X?
1.1 The Cast of Characters 9
8. Two fair coins are flipped at random and in succession. Write the sample space explicitly,
and describe a reasonable probability measure on it. If X is the random variable that counts
the number of heads, find the probability distribution of X and compute the expected value
of X.
9. Using the data in Exercise 3, give an empirical estimate of the probability distribution of
the random variable X that gives the ACT score of a randomly selected student. What is the
expected value of X, and what is its real meaning in this context?
10. (Mathematica) Use the DrawIntegerSample command introduced in the section to build
a command that draws a desired number of samples, each of a desired size, from the set
1, 2, ..., popsize. For each sample, the command appends the maximum number in the
sample to a list. This list can be used to create a histogram of the distribution of maxima.
Repeat the experiment of taking 50 random samples of size 4 from 1, 2, ... , 7 several
times. Describe in words the most salient features of the histograms of the maximum. Use
one of your replications to give an empirical estimate of the probability distribution of the
maximum.
11. (Mathematica) The command SimulateMysteryX[m] illustrated below will simulate a
desired number m of values of a mystery random variable X. First load the KnoxProb7`Utili-
ties` package, then run the command several times using specific numerical values for m.
Try to estimate the probability distribution of X and its expected value.
SimulateMysteryX 10
12. (Mathematica) Write a command in Mathematica which can take as input a list of pairs
pi , xi in which a random variable X takes on the value xi with probability pi and return the
expectation of X. Test your command on the random variable whose probability distribution
is in the table below.
value of X 0 1 2 3
probability 1 4 1 2 1 8 1 8
13. Two flights are selected randomly and in sequence from a list of departing flights
covering a single day at an airport. There were 100 flights in the list, among which 80
departed on time, and 20 did not. Write a description of the sample space of the experiment
of selecting the two flights, and use the multiplication principle to count how many elements
the sample space has. Now let X be the number of flights in the sample of two that were
late. Find the probability distribution of X .
10 Chapter 1 Discrete Probability
1
3
5
There are 5 possible outcomes, namely, the scores 1-5. We can think of the experi-
ment of randomly sampling a student score as spinning the arrow on the pie chart of Figure
2, which has been constructed so that the angles of the circular wedges are proportional to
the frequencies in the categories that were listed in the last paragraph.
This example illustrates several important features of the subject of probability.
First, there is an underlying physics that drives the motion and final resting position of the
arrow. But differences in the starting point, the angular momentum imparted to the arrow,
and even slight wind currents and unevenness of the surface of the spinner give rise to a non-
deterministic or random phenomenon. We cannot predict with certainty where the arrow
will land. It could be philosophically argued that if we knew all of these randomizing factors
perfectly, then the laws of physics would perfectly predict the landing point of the arrow, so
that the phenomenon is not really random. Perhaps this is true in most, if not all, phenomena
that we call random. Nevertheless, it is difficult to know these factors, and the ability to
measure likelihoods of events that we model as random is useful to have.
1.2 Properties of Probability 11
Second, this example shows the two main ways of arriving at an assignment of
probabilities. We might make simplifying assumptions which lead to a logical assignment of
probability. Or we might repeat the experiment many times and observe how frequently
events occur. We were fortunate enough here to have the background data from which our
spinner was constructed, which would indicate by simple counting that if the spinner was
truly spun "randomly" we should assign probabilities
74 293 480 254 130
P1 , P2 , P3 , P4 , P5 (1)
1231 1231 1231 1231 1231
to the five outcomes. But step back for a moment and consider what we would have to do
with our spinner if we weren't blessed with the numbers. We would have no recourse but to
perform the experiment repeatedly. If, say, 1000 spins produced 70 1's, then we would
estimate P[1] empirically by 70 1000 .07, and similarly for the other outcomes.
Third, we can attempt to generalize conclusions. This data set itself can be thought
of as a sort of repeated spinning experiment, in which each student represents a selection
from a larger universe of students who could take the test. The probabilities in formula (1),
which would be exact probabilities for the experiment of selecting one student from this
particular batch, become estimates of probabilities for a different experiment; that of
selecting 1231 students from the universe of all students, past and present, who could take
the test. Whether our particular data set is a "random" sample representing that universe
without bias is a very serious statistical question, best left for a statistics course with a good
unit on samples and surveys.
Using the probabilities in (1), how should probability be assigned to composite
events like "1 or 3?" The logical thing to do is to pool together the probabilities of all
outcomes that are contained in the composite event. Then we would have
74 480 554
P1 or 3 P1 P3 (2)
1231 1231 1231
So the probability of an event is the total of all probabilities of the outcomes that make up
the event.
Two implications follow easily from the last observation: the empty event which
contains no outcomes has probability zero. Also, the event that the spinner lands somewhere
is certain, that is, it has probability 1 (100%). Another way to look at it is that the sample
space, denoted by say, is the composite event consisting of all outcomes. In this case we
have:
P P1 or 2 or 3 or 4 or 5
P1 P2 P5
74 293 130 (3)
1231 1231 1231
1
12 Chapter 1 Discrete Probability
In summary, so far we have learned that outcomes can be given probabilities between
0 and 1 using theoretical assumptions or empirical methods, and probabilities for composite
events are the totals of the outcome probabilities for outcomes in the event. Also P 0
and P 1. Try the following activity, which suggests another property. You will learn
more about that property shortly.
Activity 1 For the spinner experiment we looked at P[1 or 3]. Consider now the two
events "at least 3" and "between 1 and 3 inclusive." What is the probability of the event
"at least 3" or "between 1 and 3 inclusive"? How does this probability relate to the
individual event probabilities? Can you deduce a general principle regarding the
probability of one event or another occurring?
Sometimes we are interested in the set theoretic complement of an event, i.e., the
event that the original event does not occur. Does the probability of the complementary
event relate to the probability of the event? For the spinner, look at the events "at least 3"
and "less than 3," which are complements. We have, using formula (1):
480 254 130 864
Pat least 3 P3 or 4 or 5
1231 1231 1231 1231
(4)
74 293 367
Pless than 3 P1 or 2
1231 1231 1231
Notice that the two probabilities add to one, that is for these two events E and Ec :
PE PEc 1 (5)
This is not a coincidence. Together E and Ec contain all outcomes, and they have no
outcomes in common. The total of their probabilities must therefore equal 1, which is the
probability of the sample space.
Example 2. Let's look at another random phenomenon. Recall from Section 1.1 the
experiment of selecting a sequence of two numbers at random from the set 1, 2, 3, 4, 5
with no repetition of numbers allowed. Such an ordered selection without replacement is
known as a permutation, in this case a permutation of 2 objects from 5. Mathematica can
display all possible permutations as follows. The command
KPermutations[list, k]
in the KnoxProb7`Utilities` package returns a list of all ordered sequences of length k from
the list given in its first argument, assuming that a list member, once selected, cannot be
selected again.
1.2 Properties of Probability 13
Needs"KnoxProb7`Utilities`"
KPermutations1, 2, 3, 4, 5, 2
1, 2, 2, 1, 1, 3, 3, 1, 1, 4, 4, 1,
1, 5, 5, 1, 2, 3, 3, 2, 2, 4, 4, 2, 2, 5,
5, 2, 3, 4, 4, 3, 3, 5, 5, 3, 4, 5, 5, 4
20
As the Length output reports, there are 20 such permutations. These 20 are the outcomes that
form the sample space of the experiment. The randomness of the drawing makes it quite
reasonable to take the theoretical approach to assigning probabilities. Each outcome should
have the same likelihood. Since the total sample space has probability 1, the common
likelihood of the simple events, say x, satisfies
x x x 20 times 1 20 x 1 x 1 20 (6)
In other words, our probability measure on the sample space is defined on outcomes as:
P1, 2 P2, 1 P1, 3 P5, 4 1 20 (7)
and for composite events, we can again total the probabilities of outcomes contained in them.
Activity 2 In the example of selecting two positive integers from the first five, find the
probability that 1 is in the sample. Explain why your result is intuitively reasonable.
For instance,
Peither 1 or 2 is in the sample
P1, 2, 2, 1, 1, 3, 3, 1, 1, 4, 4, 1, 1, 5, 5, 1,
2, 3, 3, 2, 2, 4, 4, 2, 2, 5, 5, 2
14 20
and
P2 is not in sample
P1, 3, 3, 1, 1, 4, 4, 1, 1, 5, 5, 1, 3, 4, 4, 3, 3, 5,
5, 3, 4, 5, 5, 4
12 20
14 Chapter 1 Discrete Probability
By counting outcomes you can check that P[2 is in sample] = 8/20, which is complementary
to P[2 is not in sample] = 12/20 from above. Also notice that
8
P1 in sample P2 in sample
20
however,
14 8 8
P1 in sample or 2 in sample
20 20 20
We see that the probability of the event "either 1 is in the sample or 2 is in the sample" is not
simply the sum of the individual probability that 1 is in the sample plus the probability that 2
is in it. The reason is that in adding 8 20 8 20 we let the outcomes 1, 2 and 2, 1
contribute twice to the sum. This overstates the true probability, but we now realize that it is
easy to correct for the double count by subtracting 2 20 which is the amount of probability
contributed by the doubly counted outcomes. (See Theorem 2 below.)
Activity 3 Use Mathematica to display the ordered samples of size 3 without replace-
ment from 1, 2, 3, 4, 5, 6. What is the probability that 1 is in the sample? What is the
probability that neither 5 nor 6 is in the sample?
Armed with the experience of our examples, let us now develop a mathematical
model for probability, events, and sample spaces that proceeds from a minimal set of axioms
to derive several of the most important basic properties of probability. A few other properties
are given in the exercises.
Definition 1. A sample space of a random experiment is a set whose elements Ω are
called outcomes.
Definition 2 below is provisional we will have to be more careful about what an
event is when we come to continuous probability.
Definition 2. An event A is a subset of the sample space , hence an event is a set of
outcomes. The collection of all events is denoted by .
Suppose for example we consider another sampling experiment in which three letters
are to be selected at random, without replacement and without regard to order from the set of
letters a, b, c, d. The Combinatorica` package in Mathematica (which is loaded automati-
cally when you load KnoxProb7`Utilities`) has the commands
which, respectively, return all subsets of size k taken from the given list of objects, and all
subsets of the given universal set. We can use these to find the sample space of the experi-
ment, and the collection of events :
1.2 Properties of Probability 15
KSubsetsa, b, c, d, 3
Subsets
Notice that the empty set is the first subset of that is displayed; next are the simple
events a, b, c, a, b, d etc.; next are the two element composite events; and so forth.
In all subsequent work we will continue a practice that we have done so far, which is
to blur the distinction between outcomes Ω, which are members of the sample space, and
simple events Ω which are sets consisting of a single outcome. This will enable us to speak
of the "probability of an outcome" when in fact probability is a function on events, as seen in
the next definition.
Definition 3. A probability measure P is a function taking the family of events to the real
numbers such that
(i) P 1;
(ii) For all A , P[A] 0;
(iii) If A1 , A2 , is a sequence of pairwise disjoint events then
P[A1 A2 = PAi
i
Properties (i), (ii), and (iii) are called the axioms of probability. Our mathematical
model so far corresponds with our intuition: a random experiment has a set of possible
outcomes called the sample space, an event is a set of these outcomes, and probability
attaches a real number to each event. Axiom (i) requires the entire sample space to have
probability 1, axiom (ii) says that all probabilities are non-negative numbers, and axiom (iii)
says that when combining disjoint events, the probability of the union is the sum of the
individual event probabilities. For finite sample spaces this axiom permits us to just define
probabilities on outcomes, and then give each event a probability equal to the sum of its
(disjoint) outcome probabilities. We will encounter various ways of constructing probability
measures along the way, which we must verify to satisfy the axioms. Once having done so,
other properties of probability listed in the theorems below are ours for free. They follow
from the axioms alone, and not from any particular construction, which of course is the huge
advantage of basing a mathematical model on the smallest possible collection of axioms.
16 Chapter 1 Discrete Probability
Theorem 1 was anticipated earlier. It is generally used in cases where the comple-
ment of an event of interest is easier to handle than the original event. If we have the
probability of one of the two, then we have the other by subtracting from 1.
The next result is based on the idea that the total probability of a union can be found
by adding the individual probabilities and correcting if necessary by subtracting the probabil-
ity in the double-counted intersection region.
A B
A B
Figure 1.3 - The probability of a union is the total of the event probabilities minus the intersection probability
Proof. (See Figure 3.) Since A can be expressed as the disjoint union A = (A B)
A Bc , and B can be expressed as the disjoint union B A B B Ac we have, by
axiom (iii),
PA PB PA B PA Bc PA B PB Ac
PA Bc PB Ac 2 PA B
Therefore,
1.2 Properties of Probability 17
But it is easy to see from Figure 3 that the events (A Bc ), (B Ac ), and A B are
pairwise disjoint and their union is A B. Thus, by axiom (iii) of probability again,
PA Bc PB Ac PA B PA B (11)
Combining (10) and (11) proves the first assertion. The second assertion follows directly as
a specialization of axiom (iii) to two events. Alternatively, if A and B are disjoint, then
A B and by Exercise 11, P 0.
Activity 4 Try to devise an analogous thoerem to Theorem 2 for a three set union.
(Hint: if you subtract all paired intersection probabilities, are you doing too much?) See
Exercise 14 for a statement of the general result.
You may be curious that the axioms only require events to have non-negative
probability. It should also be clear that events must have probability less than or equal to 1,
because probability 1 represents certainty. In the exercises you are asked to give a rigorous
proof of this fact, stated below as Theorem 3.
Theorem 3. For any event A, P[A] 1.
Another intuitively obvious property is that if an event B has all of the outcomes in it
that another event A has, and perhaps more, then B should have higher probability than A.
This result is given as Theorem 4, and the proof is Exercise 12.
Theorem 4. If A and B are events such that A B, then P[A] P[B].
Theorems 3 and 4 help to reassure us that our theoretical model of probability
corresponds to our intuition, and they will be useful in certain proofs. But Theorems 1 and 2
on complements and unions are more useful in computations. We would like to finish this
section by adding a third very useful computational result, usually called the Law of Total
Probability. Basically it states that we can "divide and conquer," that is break up the
computation of a complicated probability P[A] into a sum of easier probabilities of the form
P[A B]. The imposition of condition B in addition to A presumably simplifies the computa-
tion by limiting or structuring the outcomes in the intersection. (See Figure 4.) All of our
computational results will be used regularly in the rest of the text, and the exercise set for
this section lets you begin to practice with them.
18 Chapter 1 Discrete Probability
B1 B2 ... Bn
A
Proof. We will use induction on the number of events Bi beginning with the base case n =
2. In the base case, it is clear that B2 = Bc1 , and therefore A A B1 A Bc1 and the two
sets in this union are disjoint. By Theorem 2,
PA PA B1 PA Bc1 PA B1 PA B2
Then the Ci 's are also a partition of (see Activity 5 below). By the inductive hypothesis
PA ni1 PA Ci
ni11 PA Bi PA Bn Bn1
ni 11 PA Bi P A Bn A Bn1 (13)
ni11 PA Bi PA Bn PA Bn1
n1
i1 PA Bi
Activity 5 Why are the Ci 's in the proof of the Law of Total Probability a partition of
? Why is the fourth line of (13) true?
1.2 Properties of Probability 19
Exercises 1.2
1. Consider the experiment of rolling one red die and two white dice randomly. Observe the
number of the face that lands up on the red die and the sum of the two face up numbers on
the white dice.
(a) Describe the sample space, giving the format of a typical outcome and two specific
examples of outcomes.
(b) Define a probability measure on this sample space. Argue that it satisfies the three
axioms of probability.
red die
1 2 3 4 5 6
2 3b
3 2b 1b
4 1b
5 1b 2b
6 1b
white sum
7 1b HR
8 1b 1b
9 2b 1b
10 1b
11 1b 1b
12 2 b
Exercise 2
(b) Define a probability measure on this sample space. Argue that it satisfies the three
axioms of probability.
(c) What is the probability that the random guesser gets at least two questions right?
4. (Mathematica) Use Mathematica to display the sample space of all possible random
samples without order and without replacement of three names from the list of names {Al,
Bubba, Celine, Delbert, Erma}. How many events are in the collection of all events ?
Describe a probability measure for this experiment, and find the probability that either
Bubba or Erma is in the sample.
5. Explain why each of the following attempts P1 and P2 is not a good definition of a
probability measure on the space of outcomes = {a, b, c, d, e, f, g}.
P1 P2
a .12 .16
b .05 .20
c .21 .20
d .01 .12
e .04 .08
f .28 .15
g .13 .12
6. (Mathematica) Use Mathematica to display the sample space of all possible random
samples in succession and without replacement of two numbers from the set 1, 2, ..., 10.
Describe a probability measure, and find the probability that 10 is not in the sample.
7. A 1999 Internal Revenue Service study showed that 44.9 million U.S. taxpayers reported
earnings of less than $20,000, 20.4 million earned between $20,000 and $30,000, 16.2
million earned between $30,000 and $40,000, 41.9 million earned between $40,000 and
$100,000, and 10.5 million earned more than $100,000.
(a) Write the outcomes for the experiment of sampling one taxpayer at random, and define
a probability measure. In such a random sample of one taxpayer, what is the probability that
the reported earnings is at least $30,000?
(b) Write the outcomes for the experiment of sampling two taxpayers at random and with
replacement, that is, once a taxpayer has been selected that person goes back into the pool
and could be selected again. Define a probability measure. (Hint: for a succession of two
events which do not depend on one another, it makes sense to compute the probability that
they both occur as the product of their probabilities. You can convince yourself of this by
considering a very simple experiment like the flip of two coins.) Find the probability that at
least one of the two earned more than $100,000.
1.2 Properties of Probability 21
x,y
2 1 1 2
Exercise 8
15. The general result for the probability of a union, which has Theorem 2 and Exercise 14
as special cases, is called the law of inclusion and exclusion. Let A1 , A2 , A3 , ..., An be a
collection of n events. To simplify notation, let Aij stand for a typical intersection of two of
them Ai A j , let Aijk stand for a three-fold intersection Ai Aj Ak , etc. The law states that
22 Chapter 1 Discrete Probability
PA1 A2 A3 ... An
PAi PAij PAijk
i i j i j k
n1
1 PA1 A2 A3 ... An
In other words, one alternately adds and subtracts all k-fold intersection probabilities as k
goes from 1 to n. Use this result in the following classical problem. Four men leave their
hats at a hat check station, then on departing take a hat randomly. Find the probability that
at least one man takes his own hat.
16. Recall Exercise 5 of Section 1.1 (the blackjack deal). Use the Law of Total Probability,
Theorem 5, to find P[queen on 2nd] in a well-justified way.
17. There are two groups of experimental subjects, one with 2 men and 3 women and the
other with 3 men and 2 women. A person is selected at random from the first group and
placed into the second group. Then a person is randomly selected from the second group.
Use the Law of Total Probability to find the probability that the person selected from the
second group is a woman.
In this book we will include as appropriate problems taken from the list of sample
questions for the Society of Actuaries/Casualty Actuarial Society qualifying exam P
(Probability). These problems have been obtained with permission from the societies at the
website www.soa.org/files/pdf/P-09-05ques.pdf.
Sample Problems from Actuarial Exam P
18. The probability that a visit to a primary care physician's (PCP) office results in neither
lab work nor referral to a specialist is 35%. Of those coming to a PCP's office, 30% are
referred to specialists and 40% require lab work. Determine the probability that a visit to a
PCP's office results in both lab work and referral to a specialist.
19. An urn contains 10 balls: 4 red and 6 blue. A second urn contains 16 red balls and an
unknown number of blue balls. A single ball is drawn from each urn. The probability that
both balls are the same color is 0.44. Calculate the number of blue balls in the second urn.
20. An auto insurance company has 10,000 policyholders. Each policyholder is classified as:
(i) young or old; (ii) male or female; and (iii) married or single. Of these policyholders, 3000
are young, 4600 are male, and 7000 are married. The policyholders can also be classified as
1320 young males, 3010 married males, and 1400 young married persons. Finally, 600 of
the policyholders are young married males. How many of the company's policyholders are
young, female, and single?
21. An insurer offers a health plan to the employees of a large company. As part of this plan,
the individual employees may choose exactly two of the supplementary coverages A, B, and
C, or they may choose no supplementary coverage. The proportions of the company's
employees that choose coverages A, B, and C are 1/4, 1/3, and 5/12 respectively. Determine
the probability that a randomly chosen employee will choose no supplementary coverage.
1.3 Simulation 23
1.3 Simulation
To simulate means to reproduce the results of a real phenomenon by artificial means.
We are interested here in phenomena that have a random element. What we really simulate
are the outcomes of a sample space and/or the states of a random variable in accordance with
the probability measure or distribution that we are assuming. Computers give a fast and
convenient way of carrying out these sorts of simulations.
There are several reasons to use simulation in problems. Sometimes we do not yet
have a good understanding of a phenomenon, and observing it repeatedly may give us
intuition about a question related to it. In such cases, closed form analytical results might be
derivable, and the simulation mostly serves the purpose of suggesting what to try to prove.
But many times the system under study is complex enough that analysis is either very
difficult or impossible. (Queueing problems see Section 6.3 are good illustrations of
both situations.) Then simulation is the only means of getting approximate information, and
the tools of probability and statistics also allow us to measure our confidence in our conclu-
sions. Another reason to simulate is somewhat surprising. In some inherently non-probabilis-
tic problems we can use a simulated random target shooting approach to gain information
about physical measurements of size and shape. A simple example of such a problem
solving method (traditionally called Monte Carlo simulation in reference to the European
gaming center) is the example on area of a region in Exercise 8.
I have chosen to give the subject emphasis and early treatment in this book for
another reason. There is more at stake for you intellectually than gaining intuition about
systems by observing simulations. Building an algorithm to solve a problem by simulation
helps to teach you about the subtle concepts of the subject of probability, such as probability
measures and random variables. Thus, here and elsewhere in this book I will be asking you
to carefully study the details of programs I have written, and to write some simulation
programs in Mathematica yourself. You will invest some time and mental effort, but the
payoff will be great.
We have already experienced simulation in the form of selecting ordered samples
without replacement of two numbers from the set 1, 2, 3, 4, 5. In that context we looked
at the empirical histogram of the minimum of the two numbers. We will treat simulations of
samples again in more detail in the next section. For the time being let us see how to use
Mathematica's tools for generating streams of random numbers to solve problems.
Most of the kind of simulations that we will do are adaptations of the simple process
of choosing a random real number in the interval 0, 1. The word "random" here could be
replaced by the more descriptive word "uniform," because the assumption will be that
probability is distributed uniformly through 0, 1, with sets getting large probability only if
their size is large, not because they happen to be in some favored location in 0, 1. More
precisely, we suppose that the sample space of the random experiment is = 0, 1, the
collection of events consists of all subsets of 0, 1 for which it is possible to define their
24 Chapter 1 Discrete Probability
length, and the probability measure P gives probability to a set equal to its length. Then for
instance:
1 3 1 1 2 1 1 7
P 0, 1 1, P , , P 0, , 1 ,
2 4 4 4 3 4 3 12
5
P 0
6
UniformDistribution[{a,b}]
is the syntax for the uniform distribution on the interval [a,b], and
return, respectively, one or a list of n random numbers from the given distribution. Here are
some examples of their use.
4.42891
2.00398
Notice that new random numbers in 2, 5 are returned each time that RandomReal is called.
Incidentally, RandomReal may be used with an empty argument when the distribution being
sampled from is the uniform distribution on 0, 1, which is what we will usually need.
How do Mathematica and other programs obtain such random numbers? There are
several means that are possible, but the most common type of random number generator is
the linear congruential generator which we describe now. The ironic fact is that our
supposedly random stream of numbers is only simulated in a deterministic fashion in such a
1.3 Simulation 25
where multiplier, increment, and modulus are positive integer constants. Then, using the
newly computed seed, return the number
rand seed modulus (2)
Subsequent random numbers are found in the same way, updating seed by formula (1) and
dividing by modulus. Notice that because the initial seed is non-negative and all of the
constants are positive, seed will stay non-negative, which makes rand 0 as well. And since
the mod operation returns a value less than modulus, seed will be less than modulus, hence
rand will be less than 1. So each pseudo-random number that we produce will lie in [0, 1).
Now the larger the value of modulus, the more possible values of seed there can be;
hence, the more real numbers that can be returned when formula (2) is applied. In fact, there
would be exactly modulus number of possible seed values. But modulus, multiplier, and
increment must be carefully chosen to take advantage of this, otherwise, the sequence of
pseudo-random numbers could cycle with a very small period. As a simple example, if the
constants were as follows:
new seed 2 seed 2 mod 8
then possible seed values are 0, 1, 2, 3, 4, 5, 6, and 7, but it is easy to check that for these
seeds the new seeds are, respectively, 2, 4, 6, 0, 2, 4, 6, 0, so that after the first value of seed,
subsequent seeds can only take on one of four values. Even worse, should seed ever equal 6,
then new seeds will continue to be 6 forever, because (2 × 6 + 2) mod 8 is again 6.
Therefore, the choice of the constants is critical to making a stream of numbers that
has the appearance of randomness. There is a lot of number theory involved here which we
cannot hope to cover. The book by Rubinstein (see References) gives an introduction. It is
reported there that the values
multiplier 27 1, increment 1, modulus 235
have been successful, but these are not the only choices. We can build our own function
similar to the RandomReal command in Mathematica to generate a list of uniform[0,1]
numbers using these values as follows.
26 Chapter 1 Discrete Probability
MyRandomArrayinitialseed_, n_ :
Moduleseed, rand, thearray, mult, inc, modul, i,
mult 27 1;
inc 1;
modul 235 ;
thearray ;
seed initialseed;
Doseed Modmult seed inc, modul;
rand N seed modul;
AppendTothearray, rand, i, 1, n;
thearray
The module begins with the list of local variables used in the subsequent lines, and sets the
values above for the multiplier, here called mult, the increment inc, and the modulus modul.
After initializing an empty list of random numbers and setting the initial value of seed
according to the input initialseed, the module enters a loop. In each of the n passes through
the loop, three things are done. The seed is updated by the linear congruence relation (1), the
new random number rand is computed by formula (2), and then rand is appended to the
array of random numbers. Here is a sample run. You should try running the command again
with the same initial seed to see that you get the same sequence of pseudo-random numbers,
then try a different seed.
Activity 2 Revise the random number generating command above using the following
constants, taken from a popular computer science text.
SeedRandom[n]
which sets the initial seed value as the integer n. If you use an empty argument to SeedRan-
dom, it resets the seed using the computer's clock time. In the sequence of commands below,
the seed is set to 79, two random numbers are generated, then the seed is reset to 79, and the
same random number .624058 is returned as was returned the first time. We then reset the
seed "randomly" using the computer clock, and the first random number that is returned is
something other than .624058.
SeedRandom79;
RandomReal
RandomReal
0.624058
0.782677
SeedRandom79;
RandomReal
0.624058
SeedRandom;
RandomReal
0.295358
Activity 3 Perform a similar test with SeedRandom using a seed of 591 and requesting
a RandomReal[UniformDistribution[{0,1}], 5]. Reset the seed by computer clock time
and call for another random list of five numbers to see that different random numbers are
returned.
Example 1 It is time to build a simulation model for an actual system. A random walk on
the line is a random process in which at each time instant 0, 1, 2, … an object occupies a
point with integer coordinates shown as circled numbers in Figure 5.
28 Chapter 1 Discrete Probability
1 p 1 p 1 p 1 p 1 p
0 p
1 p
2 p
3 p
4 p
5
Figure 1.5 - Schematic diagram of a random walk
The position on the line cannot be foretold with certainty, but it satisfies the condition that if
the position is n at one time instant, then it will either be n 1 with probability p or n 1
with probability 1 p at the next time instant, as indicated by the annotated arrows in the
figure. Variations are possible, including allowing the object to wait at its current position
with some probability, enforcing boundary behavior such as absorption or reflection to
confine the random walk to a bounded interval, and increasing the dimension of the set on
which the random walk moves to 2, 3, or higher. Random walks have been used as models
for diffusion of heat, the motion of economic quantities such as stock prices, the behavior of
populations, and the status of competitive games among many other applications, and their
fascinating properties have kept probabilists busy for many decades.
For our purposes suppose we are interested in estimating the probability that a
random walk which starts at a point n 0 reaches a point M n before it reaches 0. This is a
famous problem called the gambler's ruin problem, which really asks how likely it is that a
gambler's wealth that follows a random walk reaches a target level of M before bankruptcy.
We have an initial position n followed by a sequence of random positions X1 , X2 , X3 ,
… . The underlying randomness is such that at each time a simple random experiment
determines whether the move is to the right (probability p) or the left (probability 1 p). So
to simulate the random walk we only need to be able to iteratively simulate the simple
experiment of adding 1 to the current position with probability p and subtracting 1 with
probability 1 p. We will stop when position 0 or position M is reached, and make note of
which of the two was the final position. By running such a simulation many times and
observing the proportion of times that the final state was M, we can estimate the probability
that the final state is M.
To implement the plan in the preceding paragraph, we need a way of randomly
returning +1 with probability p and 1 with probability 1 p. But since we know how to
simulate uniform real random numbers on [0,1], and the probability of an interval is equal to
its length, let's say that if a simulated uniform random number is less than or equal to p then
the result is +1, otherwise 1. Then we have the desired properties of motion, because
Pmove right P 0, p length 0, p p
Pmove left P p, 1 length p, 1 1 p
Here is a Mathematica function that does the job. A uniform random number is
selected and compared to p. If the comparison is true, then +1 is returned, else 1 is
returned. So that we can simulate random walks with different p values, we make p an
argument. One function call with p = .5 is displayed; you should try a few others.
1.3 Simulation 29
StepSizep_ : IfRandomReal p, 1, 1
StepSize.5
1
To simulate the process once, we let the initial position n be given, as well as the
right step probability p and the boundary point M. We repeatedly move by the random
StepSize amount until the random walk reaches 0 or M. The function below returns the
complete list of states that the random walk occupied. Look carefully at the code to see how
it works. The variable statelist records the current list of positions occupied by the random
walk, the variable done becomes true when either the boundary 0 or M is reached, and
variables currstate and nextstate keep track of the current and next position of the random
walk. (The || syntax means logical "or.")
Below is an example run of the command. We include a list plot of the sequence of
positions to help your understanding of the motion of the random walk. You should rerun
this command, changing parameters as desired to get more intuition about the behavior of
the random walk. A more systematic investigation is suggested in Exercise 6. We set a
random seed first for reproducibility, but if you are in the electronic version of the book and
want to see different paths of the random walk, just delete the SeedRandom command.
SeedRandom464 758;
thewalk SimulateRandomWalk0.5, 4, 8
ListPlotthewalk,
PlotStyle PointSize0.015, Black
30 Chapter 1 Discrete Probability
4, 5, 4, 5, 6, 7, 6, 5, 4, 5, 6, 5, 6,
5, 4, 5, 6, 5, 6, 5, 4, 3, 4, 3, 2, 1, 2, 3,
4, 5, 6, 5, 4, 3, 4, 3, 4, 3, 2, 3, 2, 1, 0
7
6
5
4
3
2
1
10 20 30 40
Activity 4 Roughly how would you describe the dependence of the probability that the
random walk reaches M before 0 on the value of p? How does it depend on the value of
n? How could you use SimulateRandomWalk to check your intuition about these
questions?
Continuing the random walk example, to estimate the probability of hitting M before
0 we must repeat the simulation many times, with new streams of random numbers. We
merely take note of the last element of the simulated list of positions, which will be either 0
or M, count the number of times that it is M, and divide by the number of repetitions to
estimate the probability. Here is a command that does this. Any input values we like for p, n,
and M can be used. We also let the number of replications of the simulation be a fourth
argument.
The variable absatM, initialized to zero, keeps track of how many times so far the walk has
been absorbed at M. The algorithm is simple: we repeat exactly numreps times the actions of
simulating the list of positions (called poslist) of the random walk, then pick out the last
Other documents randomly have
different content
au milieu d’un monceau de décombres, et quoique depuis longtemps à l’état
de ruine, gardait encore une fière attitude sur l’horizon. Au delà, s’étendait
la Grenouillère, et dans une vague brume azurée l’on distinguait au bord du
ciel les trois croix plantées au haut du Calvaire ou mont Valérien.
Le Louvre occupait splendidement la rive droite éclairée et dorée par un
gai rayon de soleil, plus lumineux que chaud, comme peut l’être un soleil
d’hiver, mais qui donnait un singulier relief aux détails de cette architecture
à la fois noble et riche. La longue galerie réunissant le Louvre aux Tuileries,
disposition merveilleuse qui permet au roi d’être tour à tour, quand bon lui
semble, dans sa bonne ville ou dans la campagne, déployait ses beautés
nonpareilles, fines sculptures, corniches historiées, bossages vermiculés,
colonnes et pilastres à égaler les constructions des plus habiles architectes
grecs ou romains.
A partir de l’angle où s’ouvre le balcon de Charles IX le bâtiment faisait
une retraite, laissant place à des jardins et à des constructions parasites,
champignons poussés au pied de l’ancien édifice. Sur le quai, des ponceaux
arrondissaient leurs arcades, et un peu plus en aval que la tour de Nesle
s’élevait une cour, reste du vieux Louvre de Charles V, flanquant la porte
bâtie entre le fleuve et le palais. Ces deux vieilles tours, couplées à la mode
gothique, se faisant face diagonalement, ne contribuaient pas peu à
l’agrément de la perspective. Elles rappelaient le temps de la féodalité, et
tenaient leur place parmi les architectures neuves et de bon goût, comme
une chaire à l’antique ou quelque vieux dressoir en chêne curieusement
ouvré au milieu de meubles modernes plaqués d’argent et de dorures. Ces
reliques des siècles disparus donnent aux cités une physionomie
respectable, et l’on devrait bien se garder de les faire disparaître.
Au bout du jardin des Tuileries, où finit la ville, on distinguait la porte de
la Conférence, et le long du fleuve, au delà du jardin, les arbres du Cours-
la-Reine, promenade favorite des courtisanes et personnes de qualité qui
vont là faire montre de leurs carrosses.
Les deux rives, dont nous venons de tirer un crayon rapide, encadraient
comme deux coulisses la scène animée que présentait la rivière sillonnée de
barques allant d’un bord à l’autre, obstruée de bateaux amarrés et groupés
près de la berge, ceux-là chargés de foin, ceux-ci de bois et autres denrées.
Près du quai, au bas du Louvre, les galiotes royales attiraient l’œil par leurs
ornements sculptés et dorés et leurs pavillons aux couleurs de France.
En ramenant le regard vers le pont, on apercevait par-dessus les faîtes
aigus des maisons semblables à des cartes appuyées l’une contre l’autre, les
clochetons de Saint-Germain l’Auxerrois. Ce point de vue suffisamment
contemplé, Hérode conduisit Sigognac devant la Samaritaine.
«Encore que ce soit le rendez-vous des nigauds qui restent là de longs
espaces de temps à attendre que le clocheteur de métal frappe l’heure sur le
timbre de l’horloge, il y faut aller et faire comme les autres. Un peu de
badauderie ne messied point au voyageur nouveau débarqué. Il y aurait plus
de sauvagerie que de sagesse à mépriser avec rebuffades sourcilleuses ce
qui fait le charme du populaire.»
C’est en ces termes que le Tyran s’excusait près de son compagnon
pendant que tous deux faisaient pied de grue au bas de la façade du petit
édifice hydraulique, et regardaient, attendant aussi que l’aiguille arrivât à
mettre en branle le joyeux carillon, le Jésus de plomb doré parlant à la
Samaritaine accoudée sur la margelle du puits, le cadran astronomique avec
son zodiaque et sa pomme d’ébène marquant le cours du soleil et de la lune,
le mascaron vomissant l’eau puisée au fleuve, l’Hercule à gaîne supportant
tout ce système de décoration, et la statue creuse servant de girouette
comme la Fortune à la Dogana de Venise et la Giralda à Séville.
La pointe de l’aiguille atteignit enfin le chiffre X; les clochettes se
mirent à tintinnabuler le plus joyeusement du monde avec leurs petites voix
grêles, argentines ou cuivrées, chantant un air de sarabande; le clocheteur
leva son bras d’airain, et le marteau descendit autant de fois sur le timbre
qu’il y avait d’heures à piquer. Ce mécanisme, ingénieusement élaboré par
le Flamand Lintlaer, amusa beaucoup Sigognac, lequel, bien que spirituel de
nature, était fort neuf en beaucoup de choses, n’ayant jamais quitté sa
gentilhommière au milieu des landes.
«Maintenant, dit Hérode, tournons-nous de l’autre côté; la vue n’est du
tout si magnifique par là. Les maisons du pont au Change la bornent trop
étroitement. Les bâtisses du quai de la Mégisserie ne valent rien; cependant
cette tour Saint-Jacques, ce clocher de Saint-Méderic et ces flèches
d’églises lointaines annoncent bien leur grande ville. Et sur l’île du palais,
au quai du grand cours de l’eau, ces maisons régulières de briques rouges,
reliées par des chaînes de pierre blanche, ont un aspect monumental que
termine heureusement la vieille tour de l’Horloge coiffée de son toit en
éteignoir, qui souvent perce à propos la brume du ciel. Cette place
Dauphine ouvrant son triangle en face du roi de bronze, et laissant voir la
porte du Palais, peut se ranger parmi les mieux ordonnées et les plus
propres. La flèche de la Sainte-Chapelle, cette église à deux étages, si
célèbre par son trésor et ses reliques, domine de façon gracieuse ses hauts
toits d’ardoises percés de lucarnes ornementées et qui luisent d’un éclat tout
neuf, car il n’y a pas longtemps que ces maisons sont bâties, et en mon
enfance j’ai joué à la marelle sur le terrain qu’elles occupent; grâce à la
munificence de nos rois, Paris s’embellit tous les jours à la grande
admiration des étrangers, qui, de retour dans leur pays, en racontent
merveilles, le trouvant amélioré, agrandi et quasi neuf à chaque voyage.
—Ce qui m’étonne, répondait Sigognac, encore plus que la grandeur,
richesse et somptuosité des bâtiments tant publics que privés, c’est le
nombre infini des gens qui pullulent et grouillent en ces rues, places et
ponts comme des fourmis dont on vient de renverser la fourmilière, et qui
courent éperdus de çà, de là, avec des mouvements dont on ne peut
soupçonner le but. Il est étrange à penser que parmi les individus qui
composent cette inépuisable multitude, chacun a une chambre, un lit bon ou
mauvais, et mange à peu près tous les jours, sans quoi il mourrait de
malemort. Quel prodigieux amas de victuailles, combien de troupeaux de
bœufs, de muids de farine, de poinçons de vin il faut pour nourrir tout ce
monde amoncelé sur le même point, tandis qu’en nos landes on rencontre à
peine un habitant de loin en loin!»
En effet, l’affluence du populaire qui circulait sur le Pont-Neuf avait de
quoi surprendre un provincial. Au milieu de la chaussée se suivaient et se
croisaient des carrosses à deux ou quatre chevaux, les uns fraîchement
peints et dorés, garnis de velours avec glaces aux portières se balançant sur
un moelleux ressort, peuplés de laquais à l’arrière-train et guidés par des
cochers à trognes vermeilles en grande livrée, qui contenaient à peine,
parmi cette foule, l’impatience de leur attelage; les autres moins brillants,
aux peintures ternies, aux rideaux de cuir, aux ressorts énervés, traînés par
des chevaux beaucoup plus pacifiques dont la mèche du fouet avait besoin
de réveiller l’ardeur et qui annonçaient chez leurs maîtres une moindre
opulence. Dans les premiers, à travers les vitres, on apercevait des
courtisans magnifiquement vêtus, des dames coquettement attifées; dans les
seconds des robins, docteurs et autres personnages graves. A tout cela se
mêlaient des charrettes chargées de pierre, de bois ou de tonneaux,
conduites par des charretiers brutaux à qui les embarras faisaient renier
Dieu avec une énergie endiablée. A travers ce dédale mouvant de chars, les
cavaliers cherchaient à se frayer un passage et ne manœuvraient pas si bien
qu’ils n’eussent parfois la botte effleurée et crottée par un moyeu de roue.
Les chaises à porteurs, les unes de maîtres, les autres de louage, tâchaient
de se tenir sur les bords du courant pour n’en être point entraînées, et
longeaient autant que possible les parapets du pont. Vint à passer un
troupeau de bœufs, et le désordre fut à son comble. Les bêtes cornues, nous
ne voulons pas parler des bipèdes mariés qui lors traversaient le Pont-Neuf,
mais bien des bœufs, couraient çà et là, baissant la tête, effarés, harcelés par
les chiens, bâtonnés par les conducteurs. A leur vue les chevaux
s’effrayaient, piaffaient et faisaient des pétarades. Les passants se sauvaient
de peur d’être encornés, et les chiens se glissant entre les jambes des moins
lestes les écartaient du centre de gravité et les faisaient choir plats comme
porcs. Même une dame fardée et mouchetée, toute passequillée de jayet et
de rubans couleur de feu, qui semblait quelque prêtresse de Vénus en quête
d’aventure, trébucha de ses hauts patins et s’étala sur le dos, sans se faire
mal, comme ayant habitude de telles chutes, ne manquèrent pas à dire les
mauvais plaisants qui lui donnèrent la main pour se relever. D’autres fois,
c’était une compagnie de soldats se rendant à quelque poste, enseignes
déployées et tambour en tête, et il fallait bien que la foule fît place à ces fils
de Mars accoutumés à ne point rencontrer de résistance.
«Tout ceci, dit Hérode à Sigognac que ce spectacle absorbait, n’est que
de l’ordinaire. Tâchons de fendre la presse et de gagner les endroits où se
tiennent les originaux du Pont-Neuf, figures extravagantes et falotes qu’il
est bon de considérer de plus près. Nulle autre ville que Paris n’en produit
de si hétéroclites. Elles poussent entre ses pavés comme fleurs ou plutôt
champignons difformes et monstrueux auxquels aucun sol ne convient
comme cette boue noire. Eh! tenez, voici précisément le Périgourdin du
Maillet, dit le poëte crotté, qui fait la cour au roi de bronze. Les uns
prétendent que c’est un singe échappé de quelque ménagerie; d’autres
affirment que c’est un des chameaux ramenés par M. de Nevers. On n’a pas
encore résolu le problème: moi je le tiens pour homme à sa folie, à son
arrogance, à sa malpropreté. Les singes cherchent leur vermine et la
croquent par esprit de vengeance et représailles; lui ne prend pas un tel soin;
les chameaux se lissent le poil et s’aspergent de poussière comme de poudre
d’iris; ils ont d’ailleurs plusieurs estomacs
Eh! tenez, voici le Périgourdin du Maillet, dit le poète crotté... (Page 294.)
leurs lignes rigides qui n’étaient pas précisément des nids d’amours. Une
tignasse de cheveux noirs fort emmêlée pleuvait autour de cette
physionomie bonne à sculpter sur un manche de violon et dont personne
cependant n’avait envie de se moquer, tant l’expression en était inquiétante,
narquoise et féroce.
«Que le Maulubec trousse l’animal qui me vient ainsi troubler en mes
joies et patauger parmi mes rêves anacréontiques! J’étais heureux; la plus
belle princesse de la terre m’accueillait gracieusement. Vous avez fait
envoler mon songe.
—Trêve de billevesées, fit Mérindol avec impatience, prête-moi deux
minutes ton ouïe et ton attention.
—Je n’écoute personne quand je suis gris, répondit majestueusement
Jacquemin Lampourde en s’étayant sur le coude. D’ailleurs j’ai de l’argent,
beaucoup d’argent. Nous avons cette nuit détroussé un mylord anglais tout
cousu de pistoles, je suis en train de manger et de boire ma part. Mais avec
un petit tour de lansquenet ce sera bientôt fini. A ce soir donc les affaires
sérieuses. Trouvez-vous à minuit sur le terre-plein du Pont-Neuf au pied du
cheval de bronze. J’y serai, frais, limpide, alerte, jouissant de tous mes
moyens. Nous accorderons nos flûtes et conviendrons des sommes,
lesquelles doivent être considérables, car j’aime à croire qu’on ne dérange
pas un brave comme moi pour des friponneries subalternes, des vols
insignifiants ou autres menues peccadilles. Décidément le vol m’ennuie, je
ne fais plus que l’assassinat, c’est plus noble. On est un carnassier léonin, et
non une bête de rapine. S’il s’agit de tuer, je suis votre homme, et encore
faut-il que l’attaqué se défende. Les victimes sont si lâches parfois, que cela
me dégoûte. Un peu de résistance donne du cœur à l’ouvrage.
—Oh! pour cela sois tranquille, répondit Mérindol avec un mauvais
sourire. Tu trouveras à qui parler.
—Tant mieux, fit Jacquemin Lampourde, il y a longtemps que je ne me
suis escrimé avec quelqu’un de ma force. Mais en voilà assez. Sur ce,
bonsoir, et laissez-moi dormir.»
Mérindol parti, Jacquemin Lampourde essaya de se rendormir, mais en
vain. Le sommeil interrompu ne revint pas. Le bretteur se leva, secoua
rudement le compagnon qui ronflait sous la table et tous deux s’en allèrent
dans un tripot où se jouaient le lansquenet et la bassette. L’assistance était
composée de plumets, de spadassins, de filous, de laquais, de clercs, de
quelques bourgeois naïfs conduits là par des filles, pauvres pigeons destinés
à être plumés vifs. On n’entendait que le bruit des dés roulant dans le cornet
et le froissement des cartes battues, car les joueurs sont d’ordinaire
silencieux, sauf, en cas de perte, quelques interjections blasphématoires.
Après des alternatives de chance et de guignon, le vide, duquel la nature et
l’homme surtout ont horreur, fut hermétiquement pratiqué dans les
pochettes de Lampourde. Il voulut jouer sur parole, mais ce n’était pas une
monnaie qui eût cours en ce lieu, où les joueurs, en recevant leur gain,
mordaient les pièces par manière d’éprouvette, pour voir si les louis
n’étaient point en plomb doré et les testons en étain à fondre des cuillères.
Force lui fut de se retirer nu comme un petit saint Jean, après être entré gros
seigneur et remuant les pistoles à pleine main!
«Ouf! fit-il quand l’air frais de la rue le frappa au visage et lui rendit son
sang-froid, me voilà débarrassé; c’est drôle comme l’argent me grise et
m’abrutit! Je ne m’étonne plus que les traitants soient si bêtes. Maintenant
que je n’ai plus le sol, je me sens plein d’esprit; les idées bourdonnent
autour de ma cervelle comme abeilles autour d’une ruche. De Laridon je
redeviens César! Mais voici que le clocheteur de la Samaritaine martèle
douze heures; Mérindol doit m’attendre devant le roi de bronze.»
Et il se dirigea vers le Pont-Neuf. Mérindol était à son poste, occupé à
regarder son ombre au clair de lune. Les deux spadassins, ayant bien
regardé autour d’eux pour voir si personne ne pouvait les entendre,
parlèrent cependant à voix basse pendant assez longtemps. Ce qu’ils dirent,
nous l’ignorons, mais en quittant l’agent du duc de Vallombreuse,
Lampourde faisait sonner de l’or dans ses poches avec une impudence qui
montrait combien il était redouté sur le Pont-Neuf.
... tous deux s’en allèrent dans un tripot où se jouaient le lansquenet et la bassette. (Page 307.)
XII.
LE RADIS COURONNÉ.
En quittant Mérindol, une incertitude travaillait Jacquemin Lampourde,
et lorsqu’il fut arrivé au bout du Pont-Neuf, il s’arrêta et demeura quelque
temps perplexe comme l’âne de Buridan entre ses deux mesures d’avoine,
ou, si cette comparaison ne vous plaît point, comme un fer entre deux
aimants d’égale force. D’une part le lansquenet exerçait sur lui une
attraction impérieuse avec son tintement lointain de pièces d’or; de l’autre
le cabaret se présentait orné de séductions non moindres, faisant sonner son
carillon de pots. Embarrassante alternative! Bien que les théologiens fassent
du libre arbitre la plus belle prérogative de l’homme, Lampourde, maîtrisé
par deux penchants irrésistibles, car il était aussi joueur qu’ivrogne, et aussi
ivrogne que joueur, ne savait réellement à quoi se décider. Il fit trois pas
vers le tripot; mais les bouteilles pansues, couvertes de poussière, drapées
de toiles d’araignées, coiffées d’un rouge casque de cire, apparurent à son
imagination sous un rayon si vif, qu’il en fit trois pas vers le cabaret. Alors
le Jeu agita fantastiquement à ses oreilles un cornet plein de dés plombés, et
lui arrondit devant les yeux un demi-cercle de cartes biseautées, diapré
comme une queue de paon, vision enchanteresse qui lui cloua les pieds au
sol.
«Ah çà! est-ce que je vais rester là planté comme une idole, se dit à lui-
même le bretteur impatienté de ses propres tergiversations; je dois avoir
l’air d’un franc viédaze regardant voler des coquecigrues, avec ma mine
ahurie et quidditative. Pardieu! si je n’allais ni au cabaret ni au tripot, et
rendais visite à ma déesse, à mon Iris, à la nonpareille beauté qui me retient
en ses lacs? Mais peut-être, à cette heure, sera-t-elle occupée à quelque bal
ou festin nocturne, hors de son logis. Et d’ailleurs la volupté amollit le
courage, et les plus grands capitaines se sont repentis de s’être trop adonnés
aux femmes. Témoin Hercule avec sa Déjanire, Samson avec sa Dalila,
Marc-Antoine avec sa Cléopâtre, sans compter les autres dont je ne me
souviens pas, car on a cueilli bien des fois les prunes depuis que j’ai fait
mes classes. Donc, renonçons à cette fantaisie lascive et vitupérable. Mais
que faire cependant entre ces deux charmants objets? Qui choisit l’un
s’expose à regretter l’autre.»
En minutant ce monologue, Jacquemin Lampourde, les mains plongées
dans ses poches, le menton appuyé sur sa fraise de manière à retrousser sa
barbiche, semblait pousser des racines entre les pavés et se pétrifier en
statue, comme cela arrive à plus d’un compagnon aux Métamorphoses
d’Ovide. Tout à coup il fit un soubresaut si brusque qu’un bourgeois attardé
qui passait par là s’en émut de peur et hâta le pas, croyant qu’il allait
l’assaillir et à tout le moins lui tirer la laine. Lampourde n’avait aucune
intention de détrousser ce nigaud, qu’en sa rêverie distraite il ne voyait
même point; mais une idée triomphante venait de lui traverser la cervelle.
Ses incertitudes étaient finies.
Il tira vivement un doublon de sa poche, le jeta en l’air après avoir dit:
«Pile pour le cabaret, face pour le tripot!»
La pièce pirouetta plusieurs fois, et, ramenée à terre par sa pesanteur,
retomba sur un pavé, faisant luire sa paillette d’or sous le rayon d’argent qui
s’échappait de la lune, en ce moment débarrassée de tout nuage. Le bretteur
s’agenouilla pour déchiffrer l’oracle rendu par le hasard. La pièce avait
répondu pile à la question posée. Bacchus l’emportait sur la Fortune.
«C’est bien, je me griserai,» dit Lampourde en remettant le doublon,
dont il essuya la boue, en son escarcelle profonde comme l’abîme, étant
destinée à engloutir beaucoup de choses.
Et, faisant de grandes enjambées, il se dirigea vers le cabaret du Radis
couronné, sanctuaire habituel de ses libations au dieu de la vigne. Le Radis
couronné présentait à Lampourde cet avantage d’être situé à l’angle du
Marché-Neuf, à deux pas de son logis qu’il regagnait en quelques zigzags
lorsqu’il s’était mis du vin jusqu’au nœud de la gorge, à partir de la semelle
de ses bottes.
Maintenant que je n’ai plus le sol, je me sens plein d’esprit;... (Page 308.)
C’était bien le plus abominable bouge qu’on pût imaginer. Des piliers
trapus, englués d’un rouge sanguinolent et vineux, supportaient l’énorme
poutre qui lui servait de frise et dont les rugosités affectaient de certaines
formes indiquant d’anciennes sculptures à demi effacées par le temps. Avec
beaucoup d’attention on parvenait à y démêler un enroulement de ceps et de
pampres, à travers lesquels gambadaient des singes tirant des renards par la
queue. Sur le claveau de la porte figurait un énorme radis au naturel, feuillé
de sinople et sommé d’une couronne d’or, le tout fort terni, qui depuis des
générations de buveurs servait d’enseigne et de désignation au cabaret.
Les baies formées par l’espacement des piliers étaient closes, en ce
moment, de volets à lourdes ferrures capables de soutenir un siége, mais
non si hermétiquement joints qu’ils ne laissassent filtrer des raies de
lumière rougeâtre, et s’échapper une sourde rumeur de chansons et de
querelles; ces lueurs, s’allongeant sur le pavé miroité de boue, produisaient
un effet étrange dont Lampourde ne sentit pas le côté pittoresque, mais qui
lui indiqua qu’il y avait encore nombreuse compagnie au Radis couronné.
Heurtant la porte avec le pommeau de son épée, le bretteur, par le
rhythme des coups qu’il frappa, se fit reconnaître pour un habitué de la
maison, et l’huis s’entre-bâilla afin de lui livrer passage.
La salle où se tenaient les buveurs avait assez l’air d’une caverne. Elle
était basse, et la maîtresse poutre qui traversait le plafond, ayant fait ventre
sous le tassement des étages supérieurs, semblait près de rompre, encore
qu’elle fût solide à porter un beffroi, pareille en cela à la tour de Pise ou des
Asinelli de Bologne qui penche toujours et ne tombe jamais. Les fumées
des pipes et des chandelles avaient rendu le plafond aussi noir que
l’intérieur des cheminées où l’on prépare les harengs saurs, les boutargues
et les jambons. Anciennement les murs avaient été peints d’une couleur
rouge, encadrée de sarments et brindilles de vigne, par la brosse de quelque
décorateur italien venu en France à la suite de Catherine de Médicis. La
peinture s’était conservée dans le haut de la salle, quoique bien assombrie et
ressemblant plus à des plaques de sang figé qu’à cette réjouissante teinte
écarlate dont elle devait briller en sa fleur de nouveauté. L’humidité, le
frottement des dos, la crasse des têtes qui s’y appuyaient, en avaient gâté et
détruit tout le bas, où le plâtre apparaissait sale, éraillé et nu. Jadis le
cabaret avait été mieux hanté; mais peu à peu, aux courtisans et aux
capitaines, les mœurs devenant plus délicates, s’étaient substitués des
brelandiers, des aigrefins, des coupe-bourses et des coupe-jarrets, toute une
clientèle de truands hasardeux qui avaient donné leur empreinte horrible au
bouge, et fait de la gaie taverne un repaire sinistre. Un escalier de bois
conduisant à une galerie où s’ouvraient les portes de réduits si bas, qu’on
n’y pénétrait qu’en rentrant les cornes et la tête comme un limaçon,
occupait la paroi qui faisait face à l’entrée. Sous la cage de l’escalier, à
l’ombre de la soupente, quelques futailles, les unes pleines, les autres en
vidange, étaient disposées dans une symétrie plus agréable aux ivrognes que
toute autre sorte d’ornement. Dans la cheminée à grande hotte, flambaient
des fagots de bourrée dont les bouts brûlaient jusque sur le plancher, qui,
n’étant fait que d’un carrelage de vieilles briques, ne courait pas risque
d’incendie. Ce feu illuminait de ses reflets l’étain d’un comptoir placé vis-
à-vis et où trônait le cabaretier, derrière un rempart de pots, de pintes, de
bouteilles et de brocs. Sa vive lueur, éteignant les auréoles jaunes des
chandelles qui grésillaient dans la fumée, faisait danser le long des
murailles les ombres des buveurs dessinées en caricatures, avec des nez
extravagants, des mentons de galoche, des toupets de Riquet à la houppe et
des déformations aussi bizarres que celles des Songes drolatiques de maître
Alcofribas Nasier. Ce sabbat de découpures noires, s’agitant et fourmillant
derrière les figures réelles, semblait s’en moquer et en faire spirituellement
la parodie. Les habitués du bouge, assis sur des bancs, s’accoudaient sur des
tables dont le bois tailladé d’estafilades, chamarré de noms gravés au
couteau, tatoué de brûlures, était gras de sauces et de vins répandus; mais
les manches qui l’essuyaient ne pouvaient pour la plupart être salies,
quelques-unes mêmes étant percées au coude n’y compromettaient que la
chair du bras qu’elles étaient censées revêtir. Éveillées au tintamarre du
cabaret, deux ou trois poules, Lazares emplumés, qui à cette heure eussent
dû être juchées sur leur perchoir, s’étaient glissées dans la salle par une
porte communiquant avec la cour, et picoraient sous les pieds et entre les
jambes des buveurs les miettes tombées du festin.
ebookgate.com