Download presentation

Presentation is loading. Please wait.

Published byKayla Salisbury Modified over 4 years ago

1
R_SimuSTAT_2 Prof. Ke-Sheng Cheng Dept. of Bioenvironmental Systems Eng. National Taiwan University

2
Outline – Density and CDF plots – Plot the empirical cumulative distribution function (ECDF) of a set of random numbers. – Simulation of discrete and continuous random variables – Correlation 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 2

3
A random variable is associated with its probability density function (PDF) and cumulative distribution function (CDF). Each probability density function has one or more parameters which characterize the location and shape of the PDF. We can observe how changes in parameters can affect the shape of PDF and CDF by plotting the PDF and CDF of different parameter settings. Plotting of PDF and CDF can be done using the plot and lines functions in R. 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 3

4
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 4

5
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 5

6
Suppose that a random variable X is defined on the sample space of a random experiment. The random experiment is conducted n times and yields a set of n random numbers, say {x 1, x 2, …, x n }. This set of random numbers is called a random sample of size n of the random variable. Although the random variable X is associated with a (theoretical) CDF, an empirical CDF (ECDF) of the random sample can be considered as a sample of the theoretical CDF and can constructed by 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 6

7
– Sort the random sample {x 1, x 2, …, x n } in ascending order such that { y 1 =min(x 1, x 2, …, x n ), …, y n =max(x 1, x 2, …, x n ) } – Let – Construct the plot of y vs F n (y). The plot.ecdf function yields an ECDF plot. Alternatively, the ecdf function can also be used to establish an ECDF plot. 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 7

8
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 8 plot.ecdf(x)

9
To be continued 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 9

10
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 10

11
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 11

12
Correlation between detrended cumulative- sum series. 1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 12

13
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 13

14
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 14

15
1/31/2014 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ. 15

Similar presentations

OK

Random Variables. A random variable X is a real valued function defined on the sample space, X : S R. The set { s S : X ( s ) [ a, b ] is an event}.

Random Variables. A random variable X is a real valued function defined on the sample space, X : S R. The set { s S : X ( s ) [ a, b ] is an event}.

© 2018 SlidePlayer.com Inc.

All rights reserved.

By using this website, you agree with our use of **cookies** to functioning of the site. More info in our Privacy Policy and Google Privacy & Terms.

Ads by Google

Download ppt on computer vs books essays Ppt on fair and lovely Ppt on polynomials and coordinate geometry calculator Ppt on quality control in industrial management Ppt on lathe machine operations Ppt on transformational leadership Ppt on moral education Ppt on standing order act fee Ppt on the environmental pollution its causes effects and solutions Ppt on l&t finance holding