Random Sampling  In the real world, most R.V.’s for practical applications are continuous, and have no generalized formula for f X (x) and F X (x). 

Slides:



Advertisements
Similar presentations
1 Random Sampling - Random Samples. 2 Why do we need Random Samples? Many business applications -We will have a random variable X such that the probability.
Advertisements

CS433: Modeling and Simulation
CHAPTER 6 CONTINUOUS RANDOM VARIABLES AND THE NORMAL DISTRIBUTION Prem Mann, Introductory Statistics, 8/E Copyright © 2013 John Wiley & Sons. All rights.
Probability Distributions
Test 2 Stock Option Pricing
Simulating Normal Random Variables Simulation can provide a great deal of information about the behavior of a random variable.
Scenario  You have last week’s closing stock price for a particular company. You are trying to place a value to a European call option which expires a.
Histograms & Summary Data.  Summarizing large of amounts of data in two ways: Histograms: graphs give a pictorial representation of the data Numerical.
Probability Distributions Finite Random Variables.
Probability Distributions
16 MULTIPLE INTEGRALS.
Monte Carlo Methods A Monte Carlo simulation creates samples from a known distribution For example, if you know that a coin is weighted so that heads will.
Probability Distributions Random Variables: Finite and Continuous A review MAT174, Spring 2004.
Probability Distributions Random Variables: Finite and Continuous Distribution Functions Expected value April 3 – 10, 2003.
Random Sampling. In the real world, most R.V.’s for practical applications are continuous, and have no generalized formula for f X (x) and F X (x). We.
CONTINUOUS RANDOM VARIABLES AND THE NORMAL DISTRIBUTION
Introduction to Spreadsheets Microsoft Excel. What is a spreadsheet? Enter data. Analyze data. Make graphs.
The Binomial Probability
Probability Distributions Continuous Random Variables.
Variance Fall 2003, Math 115B. Basic Idea Tables of values and graphs of the p.m.f.’s of the finite random variables, X and Y, are given in the sheet.
Introduction to Excel 2007 Bar Graphs & Histograms Psych 209 February 1st, 2011.
Ratios & Histograms. Ratios Sometimes we are not interested in the percentage that an investment increases by. Rather, we would like to know by what factor.
Probability Distributions: Finite Random Variables.
© 2010 Pearson Education Inc.Goldstein/Schneider/Lay/Asmar, CALCULUS AND ITS APPLICATIONS, 12e – Slide 1 of 15 Chapter 12 Probability and Calculus.
Monte Carlo Methods A Monte Carlo simulation creates samples from a known distribution For example, if you know that a coin is weighted so that heads will.
Slide Slide 1 Chapter 6 Normal Probability Distributions 6-1 Overview 6-2 The Standard Normal Distribution 6-3 Applications of Normal Distributions 6-4.
Simulation Output Analysis
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license.
THE NATURE OF STATISTICS Copyright © Cengage Learning. All rights reserved. 14.
Chapter 7: The Normal Probability Distribution
© 2008 Pearson Addison-Wesley. All rights reserved Chapter 1 Section 13-1 Visual Displays of Data.
STAT02 - Descriptive statistics (cont.) 1 Descriptive statistics (cont.) Lecturer: Smilen Dimitrov Applied statistics for testing and evaluation – MED4.
Modeling and Simulation CS 313
5-1 Business Statistics: A Decision-Making Approach 8 th Edition Chapter 5 Discrete Probability Distributions.
Chapter 4 Statistics. 4.1 – What is Statistics? Definition Data are observed values of random variables. The field of statistics is a collection.
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
5.3 Random Variables  Random Variable  Discrete Random Variables  Continuous Random Variables  Normal Distributions as Probability Distributions 1.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Michael Baron. Probability and Statistics for Computer Scientists,
Random Sampling. Introduction Scientists cannot possibly count every organism in a population. One way to estimate the size of a population is to collect.
Monte Carlo Methods Focus on the Project: Now that there are two folders (9am and 9pm) that contain a Queue Focus.xls file, we will create two more folders.
Dr. Fowler AFM Unit 8-1 Organizing & Visualizing Data Organize data in a frequency table. Visualizing data in a bar chart, and stem and leaf display.
The hypothesis that most people already think is true. Ex. Eating a good breakfast before a test will help you focus Notation  NULL HYPOTHESIS HoHo.
Random Sampling Approximations of E(X), p.m.f, and p.d.f.
Discrete Random Variables
Chapter 11 Data Descriptions and Probability Distributions Section 1 Graphing Data.
Simulation Using computers to simulate real- world observations.
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
CY1B2 Statistics1 (ii) Poisson distribution The Poisson distribution resembles the binomial distribution if the probability of an accident is very small.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
Simulation Chapter 16 of Quantitative Methods for Business, by Anderson, Sweeney and Williams Read sections 16.1, 16.2, 16.3, 16.4, and Appendix 16.1.
Copyright © Cengage Learning. All rights reserved. The Binomial Probability Distribution and Related Topics 6.
Stat 101Dr SaMeH1 Statistics (Stat 101) Associate Professor of Environmental Eng. Civil Engineering Department Engineering College Almajma’ah University.
Unit 6 Section : The Central Limit Theorem  Sampling Distribution – the probability distribution of a sample statistic that is formed when samples.
Copyright © Cengage Learning. All rights reserved. 5 Joint Probability Distributions and Random Samples.
Stem-and-Leaf Plots, Histograms, and Circle Graphs Objective: To graph and analyze data in many different ways.
Mini Lesson 3: Show and describe variability Make a Histogram Data Literacy Project.
MTH 231 nerd/ mth231nerddotcom.  MTH 231 Week 1 DQs  MTH 231 Week 1 Populations and Sampling Paper  MTH 231 Week 2 DQs  MTH 231 Week 2 Data— Organizing,
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics B: Michael Baron. Probability and Statistics for Computer Scientists,
Distribution of the Sample Means
The Normal Probability Distribution
10.2 Statistics Part 1.
Estimating the Value of a Parameter
CONTINUOUS RANDOM VARIABLES AND THE NORMAL DISTRIBUTION
LESSON 8: RANDOM VARIABLES EXPECTED VALUE AND VARIANCE
Constructing and Interpreting Visual Displays of Data
Unit 2 – Graphical Representation
RANDOM VARIABLES Random variable:
Budget expenses, Loans, and Stats
Chapter 5: Sampling Distributions
Presentation transcript:

Random Sampling  In the real world, most R.V.’s for practical applications are continuous, and have no generalized formula for f X (x) and F X (x).  We may approximate the density functions by taking a random sample, with a large enough sample size, n, and plot the relative frequencies within the sample.

Random Sampling  Examples:  Suppose you wanted to know more information about the GPAs of students enrolled at the U of A  Rather than look up every individual student, you can take a small sample of randomly selected students and figure out their GPAs to project what the GPAs of the entire student body would be.  Taking a poll of registered voters for the presidential election

Random Sampling  The whole idea behind random sampling is to let a part represent the whole.

Random Sampling Estimate distribution and properties of a random variable by taking a random sample We consider that all events are independent from one another Collect a sample with n items (a random sample of size n)

Random Sampling If we take a large enough sample, the histogram shows us the distribution of the data This means we know the p.m.f. graph for a finite r.v. or the p.d.f. graph for a continuous r.v. In addition, the max, min, & mean of a sample should be similar to the max, min, & mean of the variable

Random Sampling Suppose that X is the number of assembly line stoppages that occur during an 8-hour shift in our manufacturing plant. We could obtain a random sample of size 10 by watching the line for 10 different shifts and recording the number of stoppages during each eight hour shift.

Random Sampling The table below shows the number of work stoppages for various shifts: A histogram plot of these stoppages gives us a pictorial representation of how this chaotic data behaves.

Random Sampling The relative frequency histogram plot is shown below:

Random Sampling Our histogram plot of the relative frequencies for the work stoppage example can be used to approximate the p.m.f. for this situation Of course, if we increase the number of observations of shifts, our p.m.f. will be more accurate.

Random Sampling From our example, we can also look at the average number of work stoppages: The average we just found is sometimes called the sample mean and can be found using:

Random Sampling Suppose that the assembly line discussed in Example 1 runs 24 hours per day, with workers in three shifts. The sheet Numbers in the Excel file Stoppages.xls contains records of the number of stoppages per shift for nine months (819 shifts). Example 1

Random Sampling Computations in that sheet show that the number of stoppages in the sample ranged from 0 to 14, with a mean of The sample in Stoppages.xls is much larger than the one of size 10 that we considered in the previous example. Hence, we would replace the earlier estimate of 6.3 for E(X) with the new estimate of 5.78.

Random Sampling A histogram plot of the relative frequencies also give us a good estimation for the p.m.f.

Random Sampling We can also use a large sampling to approximate the p.d.f. for a continuous random variable. Plant manager wants to better understand the delays caused by stoppages of the assemble line. She is specifically interested in how long they last.

Random Sampling Let T be the length of time, in minutes, that a randomly selected stoppage will last. The duration of each of the 4,734 stoppages that occurred during the 819 shifts was recorded. This provides a random sample of observations of the continuous random variable T. The times are shown in the sheet Times in the Excel file Stoppages.xls.

Random Sampling The histogram of times is converted to relative frequencies. We would like to treat this as a p.d.f. This means the total area must be 1! To do this the area of each rectangle of our histogram must equal the relative frequency.

Random Sampling Because we already have made our bins of width 2 we must adjust the heights of our relative frequency so that the area of each rectangle equals the relative frequency. This is done by taking the relative frequencies and dividing by the bin width Notice for example the bar whose bin label is 7 has a height of 0.07, the area of this bar = 2 * 0.07 = 0.14, which is the relative frequency for this bin.

Random Sampling An example of a histogram from the Excel file Stoppages.xls is shown below

Random Sampling We can create an approximate p.d.f. by connecting the midpoints of the bins at the top of each bar Although the actual p.d.f. is smooth, this graph gives a good representation

Random Sampling Simulations used as a predictor Can give an estimate of what might happen for many trials Estimate is generally accurate

Random Sampling Simulation for finite choices Use RANDBETWEEN function in Excel Chooses an integer between two values Ex. =RANDBETWEEN(1,5) would return a value equal to 1, 2, 3, 4, or 5

Random Sampling Sample of RANDBETWEEN function

Random Sampling VLOOKUP function will find information in a table Value in leftmost column Location of table (database) Number value of column (1, 2, 3, …) Usually blank

Random Sampling Focus on the Project: In the Excel file SampleData.xls on my website, we find that there are 615 arrival values for the 9 a.m. hour. This is a random sample of the random variable A.

Random Sampling Focus on the Project: In order to graph the p.m.f. and p.d.f. the heights of the bars must be adjusted Take relative frequency (percentage) and divide by the bin width to give the new height This ensures the area under the graph will equal 1

Random Sampling Focus on the Project: p.m.f. approximating p.d.f. for variable A

Random Sampling Focus on the Project: Approximate p.d.f. and actual p.d.f. for variable A

Random Sampling Focus on the Project: Note: (since )

Random Sampling Focus on the Project: We find that there are 130 arrival values for the 9 p.m. hour. This is a random sample of the random variable B.

Random Sampling Focus on the Project: Note: (since ) we get the following for 9 p.m.

Random Sampling Focus on the Project: For the service times, we get

Random Sampling Focus on the Project: For the service times, we get the following graph

Random Sampling Focus on the Project: You may not change the name of the Excel file Queue Focus.xls You may not delete or insert any rows, columns, nor cells

Random Sampling Focus on the Project: Copy and paste your service time data from your team data into the Excel file Queue Focus.xls on the sheet Data in cells H45:H??? This will end with your last service time You should also increase the numbers in column G

Random Sampling Focus on the Project: Note: The sample data contains 8356 service time records This is the formula that exists in cell E83 (and continues to cell E282) in Queue Focus.xls in the sheet Random Sampling =IF(ISNUMBER(D83),VLOOKUP(RANDBETWEEN(1,7634), Data!$G$45:Data!$H$7678,2),"")

Random Sampling Focus on the Project: The formula should be modified as follows: =IF(ISNUMBER(D83),VLOOKUP(RANDBETWEEN(1,7634), Data!$G$45:Data!$H$7678,2),"") =IF(ISNUMBER(D83),VLOOKUP(RANDBETWEEN(1,your last service time),Data!$G$45:Data!$H$your last service time cell,2),"")

Random Sampling Focus on the Project: Change the value in cell D80 (number of customers) of Queue Focus.xls in the sheet Random Sampling to the number in your team’s Excel file in cell F18 (number of customers simulation must accommodate)