Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Probability

 Instructor: Dr.Ziad Zahreddine

 Title: The use of probability in


Computer Science

 By: Khaled Dahrouj


Why Probability is important?
Mathematical statistics is one important branch of applied probability;

other applications occur in such widely different fields as genetics,

psychology, economics, engineering and last but not least computer

science. This has released a ground swell of interest in subjects such as

complexity, chaos and artificial life. Statistical methods are ubiquitous in the

scientific literature. Courses in probability and statistics are required for

virtually all students in the natural and social sciences. Probability have

been now playing a very big role in computer programming.


Probability in the eyes of computer
scientists:
Probability is the study of random events that most people have an

intuitive understanding of degrees of probability, which is why you can use

wors like “probably” and “unlikely” without special training. The most

important part in programming is its use in problem solving in programming

languages.
Probability in programming:
The main use of probability in our life is to measure the success or

the fail of something. Also to measure the risk of many dangerous

situations.

Same goes for the use of probability in programming. Programmers use

probability to measure the success of the program before running it.

Probability is also an aspect of bulding any program which also used to

solve paradox (a seemingly contradictory statement or proposition which

when investigated may prove to be well founded or true.)


In this problem by using python language, the programmer shows us how

Minitab calculates to confidence interval according to this code for the base

plot and the fit.

Probabilistic programs are probability
distributions:
You’ve ever written a function that calls a random number generator,

you’ve written a probabilistic program. When run by a normal programming

language, such a function can be viewed as sampling from a probability

distribution. A probabilistic programming language, however, will interpret

the function as the distribution itself, and will give the programmer various

tools for asking questions about the distribution. Let’s make this idea

precise by first representing a distribution as a data structure, and then

showing a correspondence between that data structure and the

probabilistic program:

Distributions, directly:

A way we might normally think to code up a distribution is as a

function that takes a value and returns its probability; those values whose
probability is non-zero make up the sample space of the distribution. For

example, the distribution for a fair coin could be represented as

(In Ruby syntax):

Here, the sample space of the distribution is (heads and tails)

Passing either of these values to faircoindist will return their probability,

which in both cases is 0.5 because the coin is fair. We can generalize this

code to also support biased coins, where the probability of heads can vary,

as follows:
A distribution for a fair coin would be created

using CoinDist.new(0.5), but a coin that nearly always came up heads

would be CoinDist.new(0.95).

Conclusion:
As a result, one of the best things of mathematics that it is used for

sharpening your mind by learning to think logically and solve problems. So

even if you are an English major or psychologist who won’t have to graph

functions or find the area under a curve, the thinking skills that you acquire

through study of math and especially probability will remain with you and be

applicable to every part of your life.

“If nature has taught us anything it is that the impossible is probable”


-Ilyas Kassam.

You might also like