EEF 271e Week2
EEF 271e Week2
Statistics
EEF 271 E
Week 2
Tuba Yılmaz Abdolsaheb
[email protected]
Associate Professor
Instructor
• Tuba Yılmaz Abdolsaheb ([email protected])
Research Interests
• Bio electromagnetics
• Dielectric Spectroscopy
• Optimization Algorithms
• Antennas – design and testing
• Application of ML algorithms to EM
• Office: 2415
• Office Hours:
• Tuesday – 11:30 - 12:30
• Thursday– 14:00 – 15:00
• All course material and announcements will be uploaded to ninova. It is your
responsibility to check the updates on ninova!
• http://ninova.itu.edu.tr/tr/dersler/elektrik-elektronik-fakultesi/33782/eef-271e/
Exams and Grades for 10871
• 1 Midterm : %35 (WEEK 9 December 3rd 2024 – IN CLASS HOURS
• Homework - 1 Project HW: %15 (One project homework graded 15% and
suggested homeworks with no grading)
• 3 POP Quizes: %10 in total (2 of them 3%, 1 of them 4%)
• Final prerequisite: 18 points out of 60 points (YOU WILL FAIL THE COURSE
WITH VF IF YOU DO NOT MEET THIS REQUIREMENT!!!)
• Final exam: %40
• Other Notes
• The attendance is encouraged but not compulsory
• Please sit down and spare weekly (undistracted) block of time to understand the
material presented here. Do review/solve the practice questions without looking
into the solutions both from the class and from recommended or other books.
What will be covered during the
course?
• TEXTBOOK
Montgomery, Douglas C., and George C. Runger. Applied statistics and
probability for engineers. John Wiley & Sons, 2010
Sheldon Ross, 1998, A First Course in Probability, Prentice-Hall International.
• Other Resources
Murray R. Spiegel, 1961, Theory and Problems of Statistics, McGraw-Hill Book
Company.
A detailed course catalogue is available in the ninova web site. Make sure you are
added to the ninova web site.
What will be covered during the
course?
PREQUISITE: FAMILIARITY WITH SETS AND SET OPERATIONS
1. Counting techniques, permutation and combination problems
2. Probability and conditional probability
3. Random variables, Probability density function
4. Distribution function
5. Discrete distributions: Bernolli, Binom, Poisson
6. Continuous distributions: Normal, Gamma, Exponential
7. Expectation, Moment generating function
8. Measures of central tendency and dispersion, Chebchev’s inequality
9. Estimators and properties
10. Maximum likelihood estimators
11. Confidence intervals and hypothesis testing
12. One and two sample test for means
13. One and two sample test for means
14. Regression analysis
What will be covered during the
course?
Students who pass the course will be able to:
1. Solve permutation and combination problems.
2. Grasps the probability, conditional probabilities and random variables
concepts.
3. Solving real life problems in the engineering by using statistical methods.
4. Understand the details about the probability functions and apply them to
engineering problems.
5. Compute the measures of central tendency and dispersion.
6. Understand the statistical tests.
7. Construct One and two sample test for means and do the test.
8. Learn and apply regression analysis
What is probability?
• In layman terms probability is a way of expressing how likely something is to
happen based on the knowledge of the situation.
• Imagine you have a big jar filled with 100 marbles: 50 are red and 50 are blue. If
you close your eyes and pick one marble out at random, the chance or likelihood
that you'll get a red marble is what we call "probability".
• In this example, since half of the marbles are red, the probability of picking a red
marble is 50%. Similarly, the probability of picking a blue marble is also 50%.
• Mathematically: The probability of event E occurring probability defined as
• P(E)=
What is probability?
• A "random experiment" (or sometimes just referred to as an "experiment") in probability theory is a process or procedure that
produces one of several possible outcomes, and the outcome cannot be determined in advance. The unpredictability of the
result is the essence of the randomness.
• Here are some key characteristics of a random experiment:
• Multiple Outcomes: A random experiment can have multiple possible outcomes.
• Unpredictability: The outcome of the experiment is not known in advance and cannot be determined until the experiment is
performed.
• Repeatability: The experiment can be repeated under the same conditions, but the outcomes can vary from one repetition to
another due to its random nature.
• Examples of random experiments include:
• Coin Toss: Tossing a coin can result in either a 'Heads' or 'Tails'. You can't predict the outcome beforehand.
• Rolling a Die: When you roll a standard six-sided die, any number between 1 and 6 can come up, but you don't know which one
will until you roll.
• Drawing a Card: Drawing a card from a deck can result in any one of the 52 cards, but you won't know which card it will be until
you draw.
• In each of these cases, the outcome is uncertain and unpredictable until the experiment is conducted.
Random Experiments
• Experiments are
• Performed under controlled conditions
• Executed to discover a previously unknown result or verify the results
obtained from theory.
• An experiment that can result in different outcomes, even though it is
repeated in the same manner every time, is called a random
experiment.
• Example: most science experiments
Sample Spaces
• The set of all possible outcomes of a random experiment is called the
sample space of the experiment. The sample space is denoted as S.
• A sample space is discrete if it consists of a finite or countable infinite set of
outcomes.
• A sample space is continuous if it contains an interval (either finite or infinite) of
real numbers
• EXAMPLE: roll a die, toss a coin, roll two dice, toss two coins, subway
sandwich, draw a card from a deck of cards (SHOW TREE DIAGRAM)
• EVENTS: SETS OF OUTCOMES
• The sum of rolls are 12
• Both tosses are heads
• Both cards are clubs
• The sandwitch is tuna melt with swiss cheese and rye bread
What is probability?
• In probability and statistics, an "outcome" refers to a single possible result of a random experiment or process. It represents one specific
realization of the experiment.
• The "sample space" of a random experiment is the set of all possible outcomes of that experiment. It encompasses every outcome that could
possibly occur when the experiment is conducted. The sample space is often denoted by the letter S or Ω in mathematical notation.
• In the context of probability theory, an "event" is a set of outcomes of a random experiment. It describes a specific situation or set of
situations that we're interested in when a random experiment is performed. An event can consist of one or multiple outcomes.
• Coin Toss:
• Experiment: Tossing a coin.
• Sample Space (S): S={Heads (H),Tails (T)}
• Possible Outcomes: Heads (H) or Tails (T).
• If you toss the coin and it lands heads-up, then the outcome of that particular toss is "Heads.“
• An Event: The coin showing "Heads". This event consists of just one outcome, "Heads".
• Rolling a Die:
• Experiment: Rolling a standard six-sided die.
• Sample Space (S): S={1,2,3,4,5,6}
• Possible Outcomes: 1, 2, 3, 4, 5, or 6.
• If you roll the die and it shows a 4, then the outcome of that particular roll is "4.“
• An Event: The die showing an even number. This event consists of the outcomes 2, 4, and 6.
• Drawing a Card from a Deck:
• Experiment: Drawing a card from a standard deck of 52 cards.
• Sample Space (S): S consists of all 52 cards in the deck.
• Possible Outcomes: Any of the 52 cards (e.g., Ace of Spades, 10 of Hearts, etc.).
• If you draw a card and it's the Queen of Diamonds, then the outcome of that particular draw is "Queen of Diamonds.“
• An Event: Drawing a "Heart". This event consists of all the heart cards in the deck (13 outcomes).
Basic Rules of Probability
• A probability on the sample space S is a function • addition rule
from events to numbers. P(A U B) = P(A) + P(B) - P(AnB)
• The probability of event A is denoted P(A).
• Addition of mutually exclusive events:
• We have some basic requirements for the function.
P(A [ B) = P(A) + P(B) A n B = {},
(i) The whole sample space S has probability P(S) = 1
(ii) For every event A we have 0 <P(A) < 1
Probability of complement and difference:
(iii) Additivity: For any collection of mutually • P(A c
) = 1 - P(A);
exclusive events of A1, A2, …. AN we have • P(B \A) = P(B) - P(A n B):
P(A1 U A2 U... ) = P(A1) + P(A2) + .... + P(AN)
SET OPERATIONS
Some of the basic set operations are summarized below in terms of events:
• The union of two events is the event that consists of all outcomes that are
contained in either of the two events. We denote the union as E1UE2 .
• The intersection of two events is the event that consists of all outcomes
that are contained in both of the two events. We denote the intersection
as E1ՈE2.
• The complement of an event in a sample space is the set of outcomes in
the sample space that are not in the event. We denote the component of
the event E as E’.
• Two events, denoted as E1 and E2, E1ՈE2={ } such that are said to be
mutually exclusive. Example: rolling a die.
Combined Events
• When combining events use the logical operators and relate them with the
previously introduced set operations
• Consider a group of pet owners when asked A is the event that a random per
owner is keeping a dog, B is the event that a random per owner is keeping a cat,
and some of them are keeping both dog and cat.
• A and B A n B (remember that the mutually exclusive events can not happen
at the same time so no intersection for mutually exclusive events!)
• A or B A U B
• A does not occur Ac
• B occurs but A does not B/A
• Draw the diagrams!
Set operations examples
Venn Diagrams
Counting Techniques
• Rule of Sum
• Event A occurs in ‘m’ ways and event B occurs in ’n’ ways. If two events cannot happen
simultaneously then event A and B can occur m+n ways.
n(A U B)=n(A)+n(B)
• Suppose Ali has 5 science fiction books, 6 comic books, and 4 personal development books. How
many different ways can Ali select one book out of all his books.
n = 5+6+4
n = 15 different ways Ali can select one book out of all books. In other words this event has 15
different outcomes.
• Probability and Statistics course is offered by mathematics, computer engineering, and electronics
engineering departments. How many different ways can a student undertake the course?
n = 1+1+1
n = 3 different ways a student can undertake this class.
Counting Techniques
• Product Rule
• Event A occurs in ‘m’ ways and independent of event A event B occurs in ’n’ ways. Combination of event A and B can occur mn
ways.
• n(A X B)=n(A)*n(B)
• A pizza shop is offering customers the option of putting together their own pizza. The customers can choose one from each
option among sauce, vegetable and meat topping. The sauces are white or tomato sauce, vegetable options are mushrooms,
peppers, olives, and corn, meat toppings are chicken, beef and shrimp. How many different pizzas can customers order?
n = 2*4*3
n = 24 different pizza types can be ordered by the customers. In other words this event has 24different outcomes.
• Joan is packing for a holiday with 5 shirts, 3 pants, and 2 shoes. How many different outfits can she wear during the holiday.
n = 5*3*2
n = 30 outfits joan can wear during the holiday. In other words this event has 30 different outcomes.
• Suppose Airline A has two-way 3 daily flights between Istanbul and Ankara where airline B has 2 two-way daily flights between
Istanbul and Ankara. How many different ways can Ali travel from Istanbul to Ankara and Back to Istanbul.
The number of flights from Istanbul to Ankara is 3+2=5
The number of flight from Ankara to Istanbul is 3+2=5
Total number of ways Ali can travel from Istanbul to Ankara and back n = 5*5, n = 25.
Counting Techniques
• Permutations
• Arrangement of n objects with a particular order is called permutation of the objects.
• Sampling without replacement: P(n, r)=
• Sampling with replacement: nr
• 3 cards will be selected from a deck of 52 cards find the total number of outcomes when the cards are chosen
a. with replacement 523
b. without replacement P(52, 3)=
• Consider the word PLENTY how many different words can be written using the same letters regardless of meaning?
n=6!, n=720
• Consider the word ROLLER how many different words can be written using the same letters regardless of meaning?
If the letters were unique n’=6!, n’=720 but we have 2 letters repeated twice!
Therefore we divide the n’ with 2!*2!, n= 6!/(2!*2!), n=180 permuttations.
• 6 students are placed in a row 2 of them are best friends and want to stand together in how many different variations
can these students can be placed in a row.
Normally the 6 students can be placed in a row in 6! ways. But since 2 of them wants to be together we can treat them
as a single student. Therefore, we have n=5!*2, n=240 different ways to put them in a line.
Counting Techniques
• Combinations
• Selection of r objects out of n objects regardless of order can be in combination of,
C(n, r)=
• Ali is packing his luggage for a trip. He has 9 books but he can only fit 4 books to his
luggage. How many different set of books he can pack?
C(9, 4)= , C(9, 4)= 126
• Find the number of ways that three teams can be formed out of 12 students.
• There is two ways to think about this
8 8! 8 7 6 5 4!
P
4 8 7 6 5 1,680
(8 4)! 4!
Sec 2-1.4 Counting Techniques 26
Recap: Counting Techniques-Hospital
Schedule
• In a hospital, a operating room needs to schedule three knee
surgeries and two hip surgeries in a day. The knee surgery is
denoted as k and the hip as h.
• How many sequences are there?
Since there are 2 identical hip surgeries and 3 identical knee surgeries,
then
5! 5 4 3!
10
2!3! 2 1 3!
1. Select the first team: Choose 3 students from 12:C(12,3). But since we are considering the first student as fixed (as a team leader or a
reference), we actually choose 3 from the remaining 11: �(11,3)C(11,3).
2. Select the second team: Now, choose 3 students from the remaining 8 (since 3 have already been chosen for the first team and 1 is
considered fixed): C(8,3). However, one student from the first team of 3 has already been chosen, leaving us 7 to choose from: C(7,3).
• =5775
• If we are forming three teams, we need to consider how many members will be in each team from the 12 students. The question
doesn’t specify, so let’s assume the teams are of equal size, meaning 4 students per team.
• In this case, we choose the first team, then from the remaining students, we choose the second team, and the remaining students form
the third team. Since the teams are not labeled (i.e., there is no "team 1", "team 2", etc.), we need to divide by the number of ways the
teams can be arranged to avoid over-counting.
Example: Sampling w/o Replacement-1
• A bin of 50 parts contains 3 defectives and 47 non-defective
parts. A sample of 6 parts is selected from the 50 without
replacement. How many samples of size 6 contain 2 defective
parts?
• First, how many ways are there for selecting 2 parts from the 3
defective parts?
3 3!
C
2 3 different ways
2!1!
• In Excel: 3 = COMBIN(3,2)
Example: Sampling w/o
Replacement-2
• Now, how many ways are there for selecting 4 parts from the 47
non-defective parts?
47 47! 47 46 45 44 43!
C 4 178,365 different ways
4!43! 4 3 2 1 43!