Advanced LABVIEW EE 2303. Overview Of Presentation Introduction to Probability Keywords in...

18
Advanced LABVIEW EE 2303

Transcript of Advanced LABVIEW EE 2303. Overview Of Presentation Introduction to Probability Keywords in...

Page 1: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Advanced LABVIEW

EE 2303

Page 2: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Overview Of Presentation

Introduction to Probability Keywords in Probability Sample Problems in Probability Overview of Experiment Summary

Page 3: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

What is Probability???

Probability is a measure of “how likely an event is to happen”.

Mathematical Expression: Number of Favorable outcomes Total Number of possible outcomes

Page 4: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Example

Tossing a coin:

Probability of getting an HEAD= ½

Probability of getting a TAIL=1/2

Page 5: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

KEYWORDS IN PROBABILITY

An experiment is any process that generates well-defined outcomes.

The sample space for an experiment is the set of all experimental outcomes.

An “Event” is an element of the sample space, any one particular outcome.

Page 6: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Tossing a Die

Events: Sample space:

11

22

33

44

55

66

S ={1, 2, 3, 4, 5, 6}

SS•1

•3•6

•2

•4

•5

Some graphic screen captures from Seeing Statistics ®Some images © 2001-(current year) www.arttoday.com 

Page 7: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

FACTS ABOUT PROBABILITY

• Permissible values for Probability: 0- 1

• Probability of an Impossible Event = 0

• Probability of Sure Event = 1

• Probability of Event not happening = 1 – probability (event happening)• Probability (“Event happening at least once) = 1- probability ( event not happening)

Page 8: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Sample Problems

Experiment: Rolling a die

Sample Space: S = {1, 2, 3, 4, 5, 6}

Probabilities: Each Event has a 1/6 chance of occurring.

Page 9: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Example

Toss a fair coin twice. What is the probability of observing at least one head?

HHHH HTHT THTH TTTT

ANSWER : Probability (at least 1 head) = 3/4 ANSWER : Probability (at least 1 head) = 3/4

Some graphic screen captures from Seeing Statistics ®Some images © 2001-(current year) www.arttoday.com 

Page 10: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Hints for Pre lab….

• When experiment is performed “n times”… (Probability of event happening)n..

[note: for event to occur successively]

• Probability of Event not happening = 1 – probability (event happening)

• Probability of Event happening at least once = 1- prob (event not happening)

Page 11: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Working in the Diagram

Draw a For Loop Functions

Structures For Loop

Draw a Case structure Functions

Structures Case

Page 12: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Adding More to Diagram

Add a shift register Operate Value tool

Right Click on edge of For Loop

Select Add Register

Add 2 addition boxes

Add division box

Page 13: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Adding More to Diagram

Add Random Number Functions

Numeric Random (0-1)

Add Round to Nearest Functions

Numeric Round to Nearest

Page 14: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Adding More to Diagram

Add Equal box Functions

Comparison Equal?

Add Wait box Functions Time

& Delay Wait (ms)

Page 15: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Need Some Constants

Add constant of value 100 to Wait (ms)

Add constants of value 1 to Both additions Shift Register

Add constant of value 0 Equal box

Page 16: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Need Some Wire

Wire the circuit up as shown

Change the case to “True”

Wire the tunnels through the Case structure Of “True” case

Page 17: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Run the Simulation

Return to Front Panel Change to Operate Value Tool Choose a number of trials “Run simulation once”

Page 18: Advanced LABVIEW EE 2303. Overview Of Presentation  Introduction to Probability  Keywords in Probability  Sample Problems in Probability  Overview.

Summary

Probability…Overview of Experiment..Hints to Pre lab…