Skip to Main Content
Data Analysis and Statistics for Geography, Environmental Science, and Engineering
book

Data Analysis and Statistics for Geography, Environmental Science, and Engineering

by Miguel F. Acevedo
December 2012
Beginner content levelBeginner
557 pages
19h 5m
English
CRC Press
Content preview from Data Analysis and Statistics for Geography, Environmental Science, and Engineering
89Random Variables, Distributions, Moments, and Statistics
3.9.8 coMparinG saMple anD theoretical Distributions: exaMple binoMial
Generate a random sample from a binomial with p = 0.2. Verify that sample mean is approximately
equal to expected value. Run hist on the object you generated to demonstrate that the histogram
indeed looks like a binomial pmf.
Generate random sample of size 100 and store it in a vector object
>sambinom100 <- rbinom(100,3,0.2)
The arithmetic average (sample mean) of these 100 numbers is about 0.6 but not exactly. For example,
> mean(sambinom100)
[1] 0.57
Of course, it depends on the sample. Now plot histogram of the random ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Applied Modeling Techniques and Data Analysis 1

Applied Modeling Techniques and Data Analysis 1

Yannis Dimotikalis, Alex Karagrigoriou, Christina Parpoula, Christos H. Skiadas
Geospatial Data and Analysis

Geospatial Data and Analysis

Aurelia Moser, Jon Bruner, Bill Day

Publisher Resources

ISBN: 9781439885017