R Tutorial 28: Acceptance Rejection Method for Sampling (Envelope a Distribution)

  Рет қаралды 27,995

Allen Kei

Allen Kei

Күн бұрын

Пікірлер: 26
@wilsonzhang5258
@wilsonzhang5258 6 жыл бұрын
Very clear and intuitive video! Thanks for helping me with my computational statistics exam review!
@mattulrich2522
@mattulrich2522 5 жыл бұрын
^^^ Agreed
@chandrap29
@chandrap29 6 жыл бұрын
yeah it is very useful for basics of accept reject method. thanks a lot. keep on other videos.
@AllenKei
@AllenKei 6 жыл бұрын
Thank you very much!
@SebasTricht
@SebasTricht 6 жыл бұрын
Great video, really clear explanations. Thanks!
@giacomobonomelli
@giacomobonomelli 5 жыл бұрын
Thank you!! very helpful video and great explanation by the way!
@Johnnyboycurtis
@Johnnyboycurtis 6 жыл бұрын
A t-distribution or Laplace distribution would be good candidates for this. However, for tail probabilities you may need to use importance sampling. Good video!
@AllenKei
@AllenKei 6 жыл бұрын
Thank you so much for your great comments!!! Allen
@victorkalatzis8101
@victorkalatzis8101 Жыл бұрын
Hello! How can take sample from N(0,1) distribution truncated in [-1,2] with envelope Distribution laplace(0,b) ? And how can find an envelope distribution for N(0,1) that it has the biggest probability of acceptance? Thanks
@user-xt9js1jt6m
@user-xt9js1jt6m 6 жыл бұрын
very helpful sir!!
@tatianacalyamador7389
@tatianacalyamador7389 3 жыл бұрын
Nice video. I have a question... How can I use this method if I have a target density N(2,4)?
@mmski8910
@mmski8910 Жыл бұрын
How do I choose the envelope distribution. Should I go by trial and error? What if I graph the target dist and say it looks like an exp decay, if i use an exp envelope and it doesn’t work, where do I go from there?
@nicolaspitsillides4172
@nicolaspitsillides4172 2 жыл бұрын
why do you have rep(0,100000)? Could you have another number instead of 0?
@orcunsami1450
@orcunsami1450 2 жыл бұрын
You found Integrate as a 2 but you have never used it. What am I missing? For instance, in the loop, f has not been changed to pdf as how you are told.
@orcunsami1450
@orcunsami1450 2 жыл бұрын
I liked the video btw, thanks
@orcunsami1450
@orcunsami1450 2 жыл бұрын
I divided f function to 2 and result did not change. Maybe he did for this reason, not sure.
@rafiqulislam1085
@rafiqulislam1085 2 жыл бұрын
Excellent
@jdlopez131
@jdlopez131 4 жыл бұрын
pdf of normal , the constant part is 1/sqrt(2*pi) . It is not sqrt(2/pi)
@AllenKei
@AllenKei 4 жыл бұрын
f(x) is not the normal distribution. You can try to take the integral of f(x), and find its normalizing constant. Let me know if that is equal to 1/sqrt(2*pi).
@jdlopez131
@jdlopez131 4 жыл бұрын
Don't you stare in second 30 that you are speaking about the pdf of the normal distribution?
@jdlopez131
@jdlopez131 4 жыл бұрын
If you integrate the real normal distribution it will get you 1...as it is supposed to be
@jdlopez131
@jdlopez131 4 жыл бұрын
You integrate that function, like you did in your video, and you got 2 instead (what was that integral supposed to prove?)
@ltc_dingzhen_zood
@ltc_dingzhen_zood 4 жыл бұрын
多谢老哥
@jacobm7026
@jacobm7026 5 жыл бұрын
So this works to find the posterior then?
@AllenKei
@AllenKei 5 жыл бұрын
Hi, Thanks for your question. This is just to generate some samples data that follows a specific distribution. It is not yet related to Bayesian yet. Allen
@jacobm7026
@jacobm7026 5 жыл бұрын
@@AllenKei Ok thank you! I always just thought rejection sampling is a way to find the posterior distribution through sampling . Looking forward to the Bayesian stuff!
Rejection Sampling - VISUALLY EXPLAINED with EXAMPLES!
15:27
Kapil Sachdeva
Рет қаралды 29 М.
Inverse Transform Sampling : Data Science Concepts
10:54
ritvikmath
Рет қаралды 61 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Rejection Sampling + R Demo
13:28
math et al
Рет қаралды 25 М.
Accept-Reject Sampling : Data Science Concepts
17:49
ritvikmath
Рет қаралды 72 М.
An introduction to rejection sampling
10:37
Ben Lambert
Рет қаралды 53 М.
Box-Muller Transform + R Demo
9:40
math et al
Рет қаралды 11 М.
Inverse Transform Sampling - VISUALLY EXPLAINED with EXAMPLES!
13:29
Kapil Sachdeva
Рет қаралды 14 М.
Importance Sampling + R Demo
14:26
math et al
Рет қаралды 14 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 160 М.
Inverse Transform Sampling + R Demo
9:03
math et al
Рет қаралды 38 М.
Monte Carlo Simulation
10:06
MarbleScience
Рет қаралды 1,5 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН