CS-UY 1114 Lecture Notes - Lecture 9: Probability Distribution, Random Variable

55 views4 pages

Document Summary

Continuous random variable: a variable that can take on any value of an infinite number of possible values within 1+ ranges randomly (with certain probability density) Discrete random variable: variable that takes discrete values at random. Simplest and most useful continuous random variable is one that is distributed uniformly and randomly. Values found with rand function are distributed uniformly within [0,1] probability density of variable. Random numbers are not truly random rng(0); %same as writing rng( default") rand(m,n) %gives a m x n matrix of random numbers rand(m) %gives a m x m matrix of random numbers. Rand=a+(b-a)*rand(m,n) % where the interval you want is [a,b] A method that uses a large # of randomly created sample points from the relevant variables. %% compute pi by simulation clear; clc; npts = 7e6; Dist = sqrt (xcoord . ^ 2 + ycoord . ^2); Isinside = dist < 1; numberinside=sum(isinside); %can also use nnz.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents