# Intro to Python & Random Number Generation

2. Context
Both wired and wireless data networks have some degree of randomness that affect their operation.
Examples of such randomness are the packet loss probability during transmission, random back-off
times before transmission/re-transmission on a shared medium, buffer overflow errors due to
congestion, etc. Such random parameters are usually modeled in simulation using randomly generated
numbers from probability distributions that match the observed behavior in real life.
3. Objectives
The objective of this first lab is to set-up and familiarize yourself with the Python programming
environment. More precisely, the main task in this first lab is to generate random numbers from
different probability distributions using existing libraries and calculate various statistics.

4. Manipulations/Questions
4.1) List a few processes related to computer networks that involve randomness.
4.2) Using the built-in functions from Python, generate random numbers from the standard Uniform
distribution
. Generate 10, 100, 1000, 10000 and 100000 random numbers using a seed of 5. For each
set of generated random numbers:
Plot a histogram with 30 bins. Your histogram should show the number of occurrences
in each bin.
Calculate the mean
Calculate the variance
Calculate the standard deviation
4.3) Using the random.exponential function, repeat Step 4.2 for the Exponential distribution with a
rate (
𝜆) of 1/5.
Note: Different function implementations exist in Python for generating the Exponential
distribution. Some use the “rate” parameter, which is the average number of arrivals during a
certain time interval, while others use the “scale” parameter, which is 1/rate. Make sure you
use the correct parameter in your function.
4.4) Repeat Step 4.2 for the Poisson distribution with a mean of 5.
FYI: The Exponential distribution is a continuous distribution that is often used to model the
interarrival times between randomly occurring events (like the interarrival times between
customers walking into a store), while the Poisson distribution is a discrete distribution that is
often used to model the number of random events during a fixed time interval (like the number
of customers in an hour).
4.5) What is the goal of plotting histograms?
4.6) Based on the Uniform and Exponential distributions that you used previously, what should be the
theoretical mean?
4.7) What is the effect on the accuracy of the results as we generate more numbers? Justify your
answer with the results from the previous questions.
5. Lab report
Your lab report (one report per team) should contain the following:
A cover page with your names, student IDs, and lab number.
Answers to all questions/manipulations from Section 4.
Your source files (code) used to complete this lab.

Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

We value our customers and so we ensure that what we do is 100% original..
At Custom Writing, we believe in exemplary services that are fully geared toward customer satisfaction. That is why we don’t shy away from giving you the following guarantees;

### Money-back guarantee

Trusting us with your work is the best decision you have made, our pleasure lies in seeing you satisfied at 100%. If in the rear chance it happens that you are not satisfied, then know that we will equally not be satisfied. But worry not, our 30 days- Money back guarantee is all you need and that is what we promise you..

### Zero-plagiarism guarantee

We utilize profoundly equipped and gifted writers who produce unique papers liberated from any form of plagiarism. To guarantee this, we run all papers finished by our scholars through a Plagiarism checker to ensure uniqueness and originality. In any case, on the off chance that you have vulnerabilities about the originality or falsification of any paper we have finished and conveyed to you, please get in touch with us straight away. We will quickly investigate, and if the paper is seen as counterfeited, we will take suitable actions including but not limited to, revising the paper for free and in extreme cases we will activate the money back guarantee.

### Free-revision policy

We have an obligation deliver great and specially composed assignments. Our revision strategy endeavors to ensure total client satisfaction, comfort, and a genuine feelings of serenity. We make minor updates and corrections to the underlying request as part of our continuous assistance. However, revisions should just incorporate changes and alterations that were not effectively met, in the underlying request and that are inside the rules as per the current request structure..

Our client's Data is an Integral part of our business but clearly, we are not in the business of offering our clients' very own data to others. We realize that you care how your online data is utilized and shared, we equally value your trust that we will do so cautiously and sensibly. We Promise to ensure the security of your own data during transmission by utilizing encryption conventions and programming. Likewise assist us with securing your information by not sharing your passwords and usernames.

### Fair-cooperation guarantee

In submitting a request with us, you consent to the services we give. We will strive to take the necessary steps to convey a far reaching paper according to your prerequisites. Equally we depend on your cooperation to guarantee that we convey on this order.

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors: