Information Technology Reference
In-Depth Information
Chapter 1
Computing Integrals
1.1
Background
In Oslo, there is a chain of small cafes called Bagel and Juice that serve fresh bagels
and tasty juice. We know of such a cafe on Hegdehaugsveien, fairly close to the
University of Oslo. The owner of this cafe, as well as all the other owners, faces one
particular problem each night: She has to determine how many bagels to order for
the next day. Obviously, on the one hand, she wants to have a sufficient supply for
the customers. However, on the other hand, she does not want to order more than
she will be able to sell, because the surplus has to be discarded or sold elsewhere at
a loss.
A reasonable approach to this problem is to try to ensure that on, for instance,
95% of the days, the owner has enough bagels, but in the remaining 5% she has to
disappoint the last few customers. The problem of determining how many bagels
are needed in order to fulfill the need on 95% of the days is a problem of statistics.
Here, we will just accept the statistical approach to this problem and focus on the
computational problem that it generates. This situation is rather common in scien-
tific computing: You are not the one to formulate the problem - you are the one
to solve it. Often, solving the problem is only possible when you understand the
background of the problem.
A standard statistical approach to this problem is to use a probability density
function to model the number of bagels sold per day. By integrating this function
from a value a to another value b, we get a figure representing the probability that the
number of bagels sold on one particular day is larger than a and smaller than b.But
how should we choose an appropriate probability density function? In the present
problem, we can easily compute the average number of bagels sold per day. It is
more likely that the number of bagels sold on an arbitrary day is close to this aver-
age rather than far away. In such probability problems, the so-called normal, or
Gaussian, probability density function is a good candidate. This probability density
function is uniquely determined by two parameters: the average and the standard
deviation. Suppose we have counted the number of bagels sold each day over a
Search WWH ::




Custom Search