1. Trang chủ
  2. » Tất cả

Probability and distribution with r

521 4 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Probability and Distributions with R
Tác giả Nguyen An Khuong
Trường học Hochiminh City University of Technology (HCMUT), VNU-HCM
Chuyên ngành Probability and Distribution
Thể loại Lecture Notes
Năm xuất bản 2016
Thành phố Ho Chi Minh City
Định dạng
Số trang 521
Dung lượng 5,85 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions... • We outline the basic ideas of probability and t

Trang 1

Introduction to

Probability and Distributions with R

Nguyen An Khuong, HCMUT, VNU-HCM

Ngày 15 tháng 9 năm 2016

Trang 3

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 4

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 5

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 6

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 7

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 8

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 9

Probability and distributions with R

Randomness

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmiccomplexity,

Trang 10

Motivations

• Gambling

• Real life problems

• Computer Science: cryptology, coding theory, algorithmic

complexity,

Trang 11

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 12

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 13

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 14

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 15

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 16

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 17

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 18

Probability and distributions with R

Randomness

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 19

Randomness

Which of these arerandom phenomena?

• The number you receive when rolling a fairdice

• The sequence for lottery special prize (by law!)

• Your blood type (No!)

• You met the red light on the way to school

• The traffic light isnotrandom It has timer

• The pattern ofyour ridingis random

So what is special about randomness?

In thelong run, they are predictable and haverelative frequency(fraction

of times that the event occurs over and over and over)

Trang 20

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectlyreproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate tomany decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:

vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 21

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectly

reproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate tomany decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:

vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 22

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectly

reproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate tomany decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 23

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectly

reproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate to

many decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 24

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectly

reproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate to

many decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 25

Probability and distributions with R

Randomness

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectly

reproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate to

many decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:

vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that Rhas for random sampling and handling of theoretical distributions

Trang 26

Randomness in Statistics

• Randomness and probability: central to statistics

• Empirical fact: Most experiments and investigations are not perfectlyreproducible

• The degree of irreproducibility may vary:

• Some experiments in physics may yield data that are accurate to

many decimal places,

• whereas data on biological systems are typically much less reliable

• View of data as something coming from a statistical distribution:

vital to understanding statistical methods

• We outline the basic ideas of probability and the functions that R

has for random sampling and handling of theoretical distributions

Trang 27

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample:

dealing from awell-shuffled pack of cards or picking numbered balls from awell-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 28

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample:

dealing from awell-shuffled pack of cards or picking numbered balls from awell-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 29

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample:

dealing from awell-shuffled pack of cards or picking numbered balls from awell-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 30

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample: dealing from a

well-shuffled pack of cards or

picking numbered balls from awell-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 31

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample: dealing from a

well-shuffled pack of cards or picking numbered balls from a

well-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 32

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample: dealing from a

well-shuffled pack of cards or picking numbered balls from a

well-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, then

you can write

> sample(1:40,5)[1] 4 30 28 40 13

Trang 33

Probability and distributions with R

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games and

gambling issues, based on symmetry considerations

• The basic notion then is that of a random sample: dealing from a

well-shuffled pack of cards or picking numbered balls from a

well-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, then

you can write

> sample(1:40,5)

[1] 4 30 28 40 13

Trang 34

Sampling with R

Random Numbers with R

• Much of the earliest work in probability theory was about games andgambling issues, based on symmetry considerations

• The basic notion then is that of a random sample: dealing from a

well-shuffled pack of cards or picking numbered balls from a

well-stirred urn

• In R, we can simulate these situations with the sample function

• If we want to pick five numbers at random from the set 1 : 40, thenyou can write

> sample(1:40,5)

[1] 4 30 28 40 13

Trang 35

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice

since a single number isinterpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling withoutreplacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Trang 36

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice

since a single number isinterpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling withoutreplacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Trang 37

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice

since a single number isinterpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling withoutreplacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Trang 38

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice

since a single number isinterpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling withoutreplacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Trang 39

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice since a single number is

interpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling withoutreplacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Trang 40

Probability and distributions with R

Sampling with R

Sample function

• The first argument (x) is a vector of values to be sampled

• The second (size) is the sample size

• Actually, sample(40, 5) would suffice since a single number is

interpreted to represent the length of a sequence of integers

• Notice that the default behavior of sample is sampling without

replacement

• That is, the samples will not contain the same number twice, andsize obviously cannot be bigger than the length of the vector to besampled

• If we want sampling with replacement, then we need to add theargument replace = TRUE

Ngày đăng: 27/02/2023, 22:11

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w