670 likes | 781 Views
Probability Theory. Instructor: Assoc. Prof. Dr. Deshi Ye ( 叶德仕 ) College of Computer Science Zhejiang University Email: yedeshi@zju.edu.cn. Course homepage: Http://www.cs.zju.edu.cn/people/yedeshi/prob12/. Outline. Brief introduction to the course
E N D
Probability Theory Instructor: Assoc. Prof. Dr. Deshi Ye ( 叶德仕 ) College of Computer Science Zhejiang University Email: yedeshi@zju.edu.cn Course homepage: Http://www.cs.zju.edu.cn/people/yedeshi/prob12/
Outline • Brief introduction to the course • Syllabus, course policies and contents • Introduction to probability and statistics • History and importance • Treatment of data • Graphs: Pareto Diagram, Dot Diagram, Box-plot • Frequency distribution, Stem-and-leaf Displays
Course information • What is for? • This course provides an elementary introduction to probability with applications. • Topics include: • axioms of probability; • basic probability concepts and models (counting methods , conditional probability, Bayes theorem,et.); • random variables;independence; • discrete and continuous probability distributions; • calculate mathematical expectation and variance; • limit theory
Course Goals • Students at the end of course should be able to do the following: • 1) Understand the concepts and methods of probability theory • 2) Contrast, evaluate, and implement simulations or experiments • 3) Utilize Minitab program for analyzing data and summarizing
Syllabus • Prerequisite: one year course in calculus • Textbooks (required): Miller & Freund's Probability and Statistics for Engineers (Seventh Edition), Richard A. Johnson. Publishing House of Electronics Industry or Pearson Education Press. • Chapter 1-6 for “Probability Theory”, Chapter 7-13 for the second semester (“Mathematical Statistics”). • References: 1) A First course in Probability (6th Ed), Sheldon Ross. China Statistics Press. 2) Probability & Statistics for Engineers & Scientists (7th Ed), R.E. Walpole,R.H. Myers, S.L. Myers, K. Ye. Tshinghua or Pearson Education Press.
Grading • Grades for the course will be based on the following weighting1) Class attendance and Homework assignment: 36%2) Unit quiz: 24% (12%, 12%)3) Final exam: 40%
Homework • 1) You may collaborate on homework, but you must write your submitted work in your own words. All steps are required, this includes showing calculations, derivations, and proofs. Solutions will be posted on the class web site. • 2)Assignments are due in class as noted in the syllabus and web page.
Checking web page • I am highly recommend that each student check this web page at least once a week for new announcements and homework assignments. http://www.cs.zju.edu.cn/people/yedeshi/software/MiniTAB14.iso
Probability in CS • Randomized algorithms • Querying Theory • Software testing • Computer simulation and modeling
Introduction • Probability theory is devoted to the study of uncertainty and variability • Probability quantifies how uncertain we are about future events • Statistics can be described as the study of how to make inference and decisions in the face of uncertainty and variability
Uncertainty Events • Say red • Coin toss • Matching games (Cards, Name) • Traffic light • The life of a light • Lotteries?
Poker Lotteries • http://www.zjlottery.com/news/showmes.asp?newsid=9950 • Heart, Spade, Club, Diamonds • 1(A)、2、3、4、5、6、7、8、9、10、11(J)、12(Q)、13(K) • Arbitrarily choose one piece • cost 2¥,if win you are awarded 13¥ (win in 1/13)
Why measure uncertainty? • To make tradeoffs among uncertain events • Measure combined effect of several uncertain events • To communicate about uncertainty
Brief History • Blaise Pascal and Pierre de Fermat: the origins of probability are found. • concerning a popular dice game • fundamental principles of probability theory • Pierre de Laplace: • Before him, concern on the analysis of games of chance • Laplace applied probabilistic ideas to many scientific and practical problems
History cont. • Mathematical statistics is one important branch of applied probability; other applications occur in such widely different fields as genetics, psychology, economics, engineering, computer science. • Important workers: Chebyshev, Markov, von Mises, and Kolmogorov • One of the difficulties is the definition of probability. 20th century, it was solved by treating probability theory on an axiomatic basis (Kolmogorov).
Words for probability • Chance: the falling out or happening of events • Stochastic: randomly determined • Random: not sent or guided in a special direction, having no definite aim or purpose • Aleatory: dependent on the throw of a die • Hazard: a chance or venture.
Importance of Prob. Theory • Two major applications of Prob. • Risk assessment (new medical treatments) • Reliability (weather prediction, earthquake, reduce failure of consumer product) • Why statistics and probability in engineering? • Quantify the uncertainty associated with engineer model • Evaluate the result of experiment • Assess importance of measurement uncertainty • Safeguard for persons, qualities of environment, assets
A case study • Visually inspecting data to improve product quality • Monitoring manufacturing data • Ceramic part in coffee makers, which is made by filling the mixture of clay-water-oil. The depth of the slot is uncontrolled. • Slot depth was measured on three ceramic parts selected from production every half hour during the first 6 AM to 3 PM.
Time series plot Stable: 217.5 Good quality: [215, 220]
Ch2: Treatment of data • Outline • Pareto diagrams, dot diagrams • Histograms (Frequency distributions) • Stem-and-leaf display • Box-plot (Quartiles and Percentiles) • The calculation of mean and standard deviation s
What it is –Descriptive statistics • Descriptive statistics include the numbers, tables, charts, and graphs used to describe, organize, summarize, and present raw data. • central tendency (location) of data, i.e. where data tend to fall, as measured by the mean, median, and mode. • dispersion (variability) of data, i.e. how spread out data are, as measured by the variance and its square root, the standard deviation. • skew (symmetry) of data, i.e. how concentrated data are at the low or high end of the scale, as measured by the skew index. • kurtosis (peakedness) of data, i.e. how concentrated data are around a single value, as measured by the kurtosis index.
Pareto Diagram • Pareto Diagram display orders each type of failure or defect according to its frequency. • For a computer-controlled lathe whose performance was below par, workers recorded the following causes and their frequencies: power fluctuations 6 controller not stable 22 operator error 13 worn tool not replaced 2 other 5
Minitab14 • 1. Stat->Quality tools->Pareto chart • 2. Choose chart defects table as follows
Pareto diagram • Pareto diagram: depicts Pareto’s empirical law that any assortment of events consists of a few major and many minor elements. • Typically, two or three elements will account for more than half of the total frequency, i.e., it points out the main causes.
Pareto diagram--application • Software testing • Software defect distribution
Dot diagram • Second step to improve the quality of lathe, • Data were collected from observation on the deviations of cutting speed from the target value set by the controller. • EX. Cutting speed – target speed • 3 6 –2 4 7 4 • Dot diagram: A number line in which one dot is placed above a value on the number line for each occurrence of that value. That is, one dot means the value occurred once, three dots mean the value occurred three times, etc. • In minitab: stat->dotplots->simple
Dot diagram • This diagram visually summarize the information that the lathe is generally running fast.
Multiple sample • C1: 0.27 0.35 0.37 • C2: 0.23 0.15 0.25 0.24 0.30 0.33 0.26
Frequency distributions • Afrequency distributionis a tabular arrangement of data whereby the data is grouped into different intervals, and then the number of observations that belong to each interval is determined. • Data that is presented in this manner are known as grouped data.
Data001. 80 data of emission (in ton)of sulfur oxides from an industry plant • 15.8 26.4 17.3 11.2 23.9 24.8 18.7 13.9 9.0 13.2 22.7 9.8 6.2 14.7 17.5 26.1 12.8 28.6 17.6 23.7 26.8 • 22.7 18.0 20.5 11.0 20.9 15.5 19.4 16.7 10.7 19.1 15.2 22.9 26.6 20.4 21.4 19.2 21.6 16.9 19.0 18.5 23.0 • 24.6 20.1 16.2 18.0 7.7 13.5 23.5 14.5 14.4 29.6 19.4 17.0 20.8 24.3 22.5 24.6 18.4 18.1 8.3 21.9 12.3 • 22.3 13.3 11.8 19.3 20.0 25.7 31.8 25.9 10.5 15.9 27.5 18.1 17.9 9.4 24.1 20.1 28.5
Class limit and width • lower class limit: The smallest value that can belong to a given interval • upper class limit: The largest value that can belong to the interval. • Class width: The difference between the upper class limit and the lower class limit is defined to be the class width.
Guidelines for classes • 1. There should be between 5 and 20 classes. • 2.The class width should be an odd number. This will guarantee that the class midpoints are integers instead of decimals. • 3. The classes must be mutually exclusive. This means that no data value can fall into two different classes • 4. The classes must be all inclusive or exhaustive. This means that all data values must be included. • 5. The classes must be continuous. There are no gaps in a frequency distribution. Classes that have no values in them must be included (unless it's the first or last class which are dropped). • 6.The classes must be equal in width. The exception here is the first or last class. It is possible to have an "below ..." or "... and above" class. This is often used with ages
Steps • 1. Find the largest and smallest values • 2. Compute the Range = Maximum - Minimum • 3. Select the number of classes desired. This is usually between 5 and 20. • 4. Find the class width by dividing the range by the number of classes and rounding up. You must round up, not off. Normally 3.2 would round to be 3, but in rounding up, it becomes 4.
Variants of frequency distribution • The cumulative frequency distribution is obtained by computing the cumulative frequency, defined as the total frequency of all values less than the upper class limit of a particular interval, for all intervals. • Relative frequency: the ratio of the number of observations in the interval to the total number of observations • The percentage frequency distribution is arrived at by multiplying the relative frequencies of each interval by 100%.
Histogram • The most common form of graphical presentation of a frequency distribution is the histogram. • Histogram: is constructed of adjacent rectangles; the height of the rectangles is the class frequencies and the bases of the rectangles extend between successive class boundaries.
Histogram in Minitab • Graph->histogram->simple • Graph variables: c4 (all data in a column) • Edit bars: Click the bars in the output figures, in Binning, Interval type select midpoint and interval definition select midpoint/cutpoint, and then input 7 11 15 19 23 27 31 as illustrated in the following
Density histogram • When a histogram is constructed from a frequency table having classes of unequal lengths, the height of each rectangle must be changed to • Height = relative frequency / width. • The area of the rectangle then represents the relative frequency for the class and the total area of the histogram is 1.
Density Histogram • Graph->histogram->simple • Scale->Y-Scale Type->Density • Edit Bars->Binning->Cut point-> • 5 13 17 21 25 29 33
Cumulative histogram • 1) Graph->histogram->simple • 2) Dataview-> Datadisplay: check “symbos” only Smoother: check “lowess” and “0” in degree of smoothing and “1” in number of steps.
Stem-and-leaf Display • Class limits and frequency, contain data in each class, but the original data points have been lost. • Stem-and-leaf: A data plot which uses part of the data value as the stem and the rest of the data value (the leaf) to form groups or classes. This is very useful for sorting data quickly. • Stem-and-leaf: function the same as histogram but save the original data points. • Example: 11 numbers: • 12, 13, 21, 27, 33, 34, 35, 37, 40, 40, 41
Frequency table Class limits Frequency 10 – 19 2 20 – 29 2 30 – 39 4 40 – 49 3
Stem-and-leaf Stem-and-leaf: each row has a stem and each digit on a stem to the right of the vertical line is a life. The "stem" is the left-hand column which contains the tens digits. The "leaves" are the lists in the right-hand column, showing all the ones digits for each of the tens, twenties, thirties, and forties. Key: “4|0” means 40
Stem-and-leaf Display • Example in P23: 20 numbers: • 29, 44, 12, 53, 21, 34, 39, 25, 48, 23 • 17, 24, 27, 32, 34, 15, 42, 21, 28, 27 Frequency table Class limits Frequency 10 – 19 3 20 – 29 9 30 – 39 4 40 – 49 3 50 – 59 1 Stem-and-leaf 1 | 2 5 7 2 | 1 1 3 4 5 7 7 8 9 3 | 2 4 4 9 4 | 2 4 8 5 | 3