Download presentation
Presentation is loading. Please wait.
Published byRuth Edwards Modified over 9 years ago
1
Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly
2
Last class t-distribution (Excel: T.DIST. ) if: unknown standard deviation if low number of samples 2
3
Last Class 1.For each pair take the first value minus the second value to get the paired difference 2.Calculate the mean difference and the standard deviation σ of all samples 3.Calculate the standard error of the sample 4.z-value 5.Determine the p-value 3
4
Last Class Random number generators (code for random number generator at www.cs.unc.edu/~jmf/teaching/fall2012/Random.xlsx www.cs.unc.edu/~jmf/teaching/fall2012/Random.xlsx hardware generators produce truly random numbers but are slow Pseudo random number generator is fast but not truly random which can be a problem with security applications Slot machine simulation (assignment for Monday) 4
5
What do Statistics Mean? How to we know how to interpret a poll of Obama 50%±3% and Romney 48%±3%? How do we interpret an average grows of 10% of the stock market? 5 Average depth 3ft
6
Monte Carlo Simulation Simulation allows us to imitate a real world situation to obtain an understanding of it Monte Carlo Simulation is one of the frequently used simulations Monte Carlo simulation was named for Monte Carlo, Monaco, where the primary attractions are casinos containing games of chance. Games of chance such as roulette wheels, dice, and slot machines, exhibit random behavior. Chance is how the simulation choses its variable values 6
7
Monte Carlo Simulation: Random Variables Random variables are used to model the uncertainties in the real-world Define range and distribution of the variable Discrete Bernoulli (success and failure) Binomial distribution Continous uniform distribution normal distribution student distribution 7
8
Discrete Variables 8 1. A Bernoulli Random Variable: generate a single random variable between (0,1) Baby Boy Girl 1/2 IF ( RAND( ) <1/2, ‘ boy ’, ’ girl ’ ) 2. A Binomial Random Variable with n trials: BINOMINV(RAND(.),n,p)
9
Continuous Distributions Uniform distribution RAND() Normal distribution NORMSINV(RAND()) STUDENT (T) distribution TINV(RAND(),degrees of freedom) 9
10
Simulation For simulation evaluate the problem for many different values of the random variables The results of the simulation can then be analyzed to obtain summary statistics mean variance medium …… 10
11
Polls How can we simulate: “a poll of Obama 50%±3% and Romney 48%±3%?” 11
12
Polls the mean value of the poll for Obama is 50% the standard deviation is? with 95% confidence level z*=1.96 this mean that for the z-distribution 3% are within 1.96 standard deviations. hence standard deviation is 1.53%=3%/1.96 the mean value of the poll for Romney is 48% standard deviation is also 1.53% 12
13
Vote Distributions Hence the possible votes are distributed in the following manner 13
14
Simulate voting To simulate the voting we can now draw random samples from the vote distribution of the candidates random number generator with standard normal distribution scale the value by the standard deviation shift to mean value of the desired distribution (50% Obama, 48% Romney) 14
15
Stock Market How do we interpret an average grows of 10% of the stock market? Again the average grows of 10% only applies for long periods of time Stock market is often described by Brownian motion the presumably random moving of particles suspended in a fluid random motion driven by random events 15
16
Model for Stock Market Drift annually is 10%, which is the average increase in value The standard deviation is called volatility and it is 405 annually Often expressed in daily values: drift daily = 0.0397% (assuming 252 trading days) volatility daily = 2.52% 16
17
Model for Stock Market The daily value S t behaves in the following way: μ is daily drift σ is valatility T is time between the t and t-1 Simplified version 17
18
Simulation Simulate by using random variable z t to predict daily stock price 18
19
Using Randomness to Estimate Models Estimating models from measurement data line fitting finding a model to explain the data Least squares fitting sensitive to outliers Using Randomness to find the correct model 19
20
Robust data selection: RANSAC Estimation of line from point data Select m samples Compute n-parameter solution Evaluate on {potential line points} Best solution so far? Keep it {potential line points} yesno good solution probability >0.99 no Best solution, {inlier}, {outlier} {inlier samples }
21
How many iterations are needed? We want to be sure to have a good line with 99% probability depends on ratio ε of good points to bad points depends on size s of sample depends on number of iterations i What is the probability of a good sample? es es What is the probability of no good sample in i iterations? (1-e s ) i So probability of good solution is 1-(1-e s ) i 21
22
Camera Motion Estimation Where where the cameras upon photo taking? 22
23
3D from images Camera 1 Camera 2 Camera 3
24
24 Epipolar geometry estimation Typically done with RANSAC [RANSAC Fishler & Bolles ‘81] Camera motion can be described through 3x3 matrix F (Step 1) Extract features (Step 2) Set of potential correspondences (Step 3) do (Step 3.1) select minimal sample (i.e. 7 matches) (Step 3.2) compute solution(s) for F (Step 3.3) count inliers, if not promising stop until (#inliers,#samples)<95% #inliers90%80%70%50%10% #samples51335382~30 million (generate hypothesis) (verify hypothesis) [Raguram, Frahm, Pollefeys, ECCV’08] [Raguram, Frahm, Pollefeys, ICCV’09]
25
Reading Assignment for Monday Moldinov Chapter 9 25
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.