Wednesday, July 13, 2016

combination and permutation part II

Combinations

There are also two types of combinations (remember the order does not matter now):
  1. Repetition is Allowed: such as coins in your pocket (5,5,5,10,10)
  2. No Repetition: such as lottery numbers (2,14,15,27,30,33)

1. Combinations with Repetition

There are also two types of combinations (remember the order is not important now): 1.Repetition animals like coins in your pocket (5,5,5,10,10) 2.No birthday: for example, lottery numbers (2,14,15,27,30,33) 1. Combined with repetition In fact, this is the most difficult to explain, so they will come back to this later. 2. Combination without repetition Here's how it works lottery. The numbers are drawn one by one, and if we are lucky numbers (no matter what order) to win! The easiest way to explain it is: • assumed that the order is not important (ie, permutations) • then modify it so that the order is not important. Returning to the example of the ball, say what you want is to know that three billiard balls, is not selected. We already know that 3 out of 16 gives us 3360 permutations. However, many people like now, because no matter the order! For example, let's say the ball 1, 2 and 3 are selected. This may be: Order does not matter the order is not important 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 1 2 3 Therefore, the permutations will have 6 times more likely. In fact, there is no easy way to figure out how many ways "1 2 3" can be put in order, and we talk. The answer is: 3! = 3 × 2 × 1 = 6 (Another example: 4 things that can be placed in 4 = 4 × 3 × 2 × 1 = 24 different ways, try it for yourself!) Therefore, we adjust our permutations formula to reduce it by the number of ways in which objects can be in order (because we are not interested in their message more):
Actually, these are the hardest to explain, so we will come back to this later.

2. Combinations without Repetition

This is how lotteries work. The numbers are drawn one at a time, and if we have the lucky numbers (no matter what order) we win!
The easiest way to explain it is to:
  • assume that the order does matter (ie permutations),
  • then alter it so the order does not matter.
Going back to our pool ball example, let's say we just want to know which 3 pool balls are chosen, not the order.
We already know that 3 out of 16 gave us 3,360 permutations.
But many of those are the same to us now, because we don't care what order!
For example, let us say balls 1, 2 and 3 are chosen. These are the possibilites:
Order does matterOrder doesn't matter
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
1 2 3
So, the permutations will have 6 times as many possibilites.
In fact there is an easy way to work out how many ways "1 2 3" could be placed in order, and we have already talked about it. The answer is:
3! = 3 × 2 × 1 = 6
(Another example: 4 things can be placed in 4! = 4 × 3 × 2 × 1 = 24 different ways, try it for yourself!)
So we adjust our permutations formula to reduce it by how many ways the objects could be in order (because we aren't interested in their order any more):
That formula is so important it is often just written in big parentheses like this:
where n is the number of things to choose from, and we choose r of them
(No repetition, order doesn't matter)
It is often called "n choose r" (such as "16 choose 3")
And is also known as the Binomial Coefficient.

Notation

As well as the "big parentheses", people also use these notations:
 
Just remember the formula:
n!
r!(n−r)!

Example

So, our pool ball example (now without order) is:
16! = 16! = 20,922,789,888,000 = 560
3!(16-3)!3!×13!6×6,227,020,800
Or we could do it this way:
16×15×14 = 3360 = 560
3×2×16


 
It is interesting to also note how this formula is nice and symmetrical:
In other words choosing 3 balls out of 16, or choosing 13 balls out of 16 have the same number of combinations.
16! = 16! = 16! = 560
3!(16-3)!13!(16-13)!3!×13!

Pascal's Triangle

We can also use Pascal's Triangle to find the values. Go down to row "n" (the top row is 0), and then along "r" places and the value there is our answer. Here is an extract showing row 16:
1    14    91    364  ...

1    15    105   455   1365  ...

1    16   120   560   1820  4368  ...

1. Combinations with Repetition

OK, now we can tackle this one ...
Let us say there are five flavors of icecream: banana, chocolate, lemon, strawberry and vanilla.
We can have three scoops. How many variations will there be?
Let's use letters for the flavors: {b, c, l, s, v}. Example selections include
  • {c, c, c} (3 scoops of chocolate)
  • {b, l, v} (one each of banana, lemon and vanilla)
  • {b, v, v} (one of banana, two of vanilla)
(And just to be clear: There are n=5 things to choose from, and we choose r=3 of them.
Order does not matter, and we can repeat!)
Now, I can't describe directly to you how to calculate this, but I can show you a special technique that lets you work it out.
Think about the ice cream being in boxes, we could say "move past the first box, then take 3 scoops, then move along 3 more boxes to the end" and we will have 3 scoops of chocolate!
So it is like we are ordering a robot to get our ice cream, but it doesn't change anything, we still get what we want.
We can write this down as (arrow means move, circle means scoop).
In fact the three examples above can be written like this:
{c, c, c} (3 scoops of chocolate):
{b, l, v} (one each of banana, lemon and vanilla):
{b, v, v} (one of banana, two of vanilla):
OK, so instead of worrying about different flavors, we have a simpler question: "how many different ways can we arrange arrows and circles?"
Notice that there are always 3 circles (3 scoops of ice cream) and 4 arrows (we need to move 4 times to go from the 1st to 5th container).
So (being general here) there are r + (n−1) positions, and we want to choose r of them to have circles.
This is like saying "we have r + (n−1) pool balls and want to choose r of them". In other words it is now like the pool balls question, but with slightly changed numbers. And we can write it like this (note: r+(n−1) is the same as n+r−1):
where n is the number of things to choose from, and we choose r of them
(Repetition allowed, order doesn't matter)
Interestingly, we can look at the arrows instead of the circles, and say "we have r + (n−1) positions and want to choose (n−1) of them to have arrows", and the answer is the same:
So, what about our example, what is the answer?
(5+3−1)! = 7! = 5040 = 35
3!(5−1)!3!×4!6×24

In Conclusion

Phew, that was a lot to absorb, so maybe you could read it again to be sure!
But knowing how these formulas work is only half the battle. Figuring out how to interpret a real world situation can be quite hard.
But at least now you know how to calculate all 4 variations of "Order does/does not matter" and "Repeats are/are not allowed".

combination and permutation part I

Combinations and Permutations

What's the Difference?

 we use the word "combination" loosely, without thinking if the order of things is important. In other words:
"My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.
  
"The combination to the safe is 472". Now we do care about the order. "724" won't work, nor will "247". It has to be exactly 4-7-2.
 in Mathematics we use more accurate language:
If the order doesn't matter, it is a Combination.
If the order does matter it is a Permutation.


 So, we should really call this a "Permutation Lock"!
In other words:
A Permutation is an ordered Combination.


To help you to remember, think "Permutation ... Position"

this is the video
 

Permutations

There are basically two types of permutation:
  1. Repetition is Allowed: such as the lock above. It could be "333".
  2. No Repetition: for example the first three people in a running race. You can't be first and second.

1. Permutations with Repetition

it easiest to calculate.
When we have n things to choose from ... we have n choices each time!
When choosing r of them, the permutations are:
n × n × ... (r times)
(In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.)
Which is easier to write down using an exponent of r:
n × n × ... (r times) = nr
Example: in the lock above, there are 10 numbers to choose from (0,1,...9) and we choose 3 of them:
10 × 10 × ... (3 times) = 103 = 1,000 permutations
So, the formula is simply:
nr
where n is the number of things to choose from, and we choose r of them
(Repetition allowed, order matters)
 

2. Permutations without Repetition

In this case, we have to reduce the number of available choices each time.

For example, what order could 16 pool balls be in?
After choosing, say, number "14" we can't choose it again.
So, our first choice has 16 possibilites, and our next choice has 15 possibilities, then 14, 13, etc. And the total permutations are:
16 × 15 × 14 × 13 × ... = 20,922,789,888,000
But maybe we don't want to choose them all, just 3 of them, so that is only:
16 × 15 × 14 = 3,360
In other words, there are 3,360 different ways that 3 pool balls could be arranged out of 16 balls.
Without repetition our choices get reduced each time.
But how do we write that mathematically? Answer: we use the "factorial function"
The factorial function (symbol: !) just means to multiply a series of descending natural numbers. Examples:
  • 4! = 4 × 3 × 2 × 1 = 24
  • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
  • 1! = 1
Note: it is generally agreed that 0! = 1. It may seem funny that multiplying no numbers together gets us 1, but it helps simplify a lot of equations.
So, when we want to select all of the billiard balls the permutations are:
16! = 20,922,789,888,000
But when we want to select just 3 we don't want to multiply after 14. How do we do that? There is a neat trick ... we divide by 13! ...
16 × 15 × 14 × 13 × 12 ...
  = 16 × 15 × 14 = 3,360
13 × 12 ...
 
Do you see? 16! / 13! = 16 × 15 × 14
The formula is written:
where n is the number of things to choose from, and we choose r of them
(No repetition, order matters)

Examples:

Our "order of 3 out of 16 pool balls example" is:
16! = 16! = 20,922,789,888,000 = 3,360
(16-3)!13!6,227,020,800
(which is just the same as: 16 × 15 × 14 = 3,360)
How many ways can first and second place be awarded to 10 people?
10! = 10! = 3,628,800 = 90
(10-2)!8!40,320
(which is just the same as: 10 × 9 = 90)

Notation

Instead of writing the whole formula, people use different notations such as these:
Example: P(10,2) = 90

Combinations

There are also two types of combinations (remember the order is not important now): 1.Repetition Allowed: such as coins in your pocket (5,5,5,10,10) 2.No Birthday: such as lottery numbers (2,14,15,27,30,33) 1. Combination with repetition In fact, this is the most difficult to explain, so they will come back to this later. 2. Combination without repetition This is how the lottery works. The numbers are drawn one by one, and if we are lucky numbers (no matter what order) to win! The easiest way to explain it is: • it assumes that the order does not matter (ie permutations) • then modify it so that the order is not important. Returning to the example of a ball, let's say you just want to know that three billiard balls, is not selected. We already know that 3 out of 16 gives us 3360 permutations. But many people are just like now, because no matter the order! For example, they say balls 1, 2 and 3 are selected. This is possible: Order does not matter the order is not important 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 1 2 3 Therefore, the permutations will have 6 times more likely. In fact, there is no easy way to figure out how many ways "1 2 3" can be put in order, and we were talking about. The answer is: 3! = 3 × 2 × 1 = 6 (Another example: 4 things that can be placed in 4 = 4 × 3 × 2 × 1 = 24 different ways, try it for yourself!) Therefore, we adjust our permutations formula to reduce it by the number of ways in which objects can be in order (because we are not interested in your message more):

That formula is so important it is often just written in big parentheses like this:
where n is the number of things to choose from, and we choose r of them
(No repetition, order doesn't matter)
It is often called "n choose r" (such as "16 choose 3")
And is also known as the Binomial Coefficient.

Notation

As well as the "big parentheses", people also use these notations:
 
Just remember the formula:
n!
r!(n−r)!

Example

So, our pool ball example (now without order) is:
16! = 16! = 20,922,789,888,000 = 560
3!(16-3)!3!×13!6×6,227,020,800
Or we could do it this way:
16×15×14 = 3360 = 560
3×2×16


 
It is interesting to also note how this formula is nice and symmetrical:
In other words choosing 3 balls out of 16, or choosing 13 balls out of 16 have the same number of combinations.
16! = 16! = 16! = 560
3!(16-3)!13!(16-13)!3!×13!

Pascal's Triangle

We can also use Pascal's Triangle to find the values. Go down to row "n" (the top row is 0), and then along "r" places and the value there is our answer. Here is an extract showing row 16:
1    14    91    364  ...

1    15    105   455   1365  ...

1    16   120   560   1820  4368  ...

1. Combinations with Repetition


Well, now we can deal with this ...


Say there are five ice cream flavors: banana, chocolate, lemon, strawberry and vanilla.

We can have three balls. How much variation is there?

We will use the letters to guess: {b, c, l, s, v}. Examples include choice
• {c, c, c} (3 tablespoons brown)
• {b, l, v} (each a banana, lemon and vanilla)
• {b, v, v} (one banana, two vanilla)

(And let's be clear: there are n = 5 things to choose from, and we chose r = 3 of them.
the order is not important, and we can repeat!)

Now, I can not describe to you how to calculate this, but I can show special technique that allows you to exercise.


Think of ice cream in a box, we can say "leave the first frame, then take 3 tablespoons, then pass along 3 more boxes until the end" and we will have 3 tablespoons chocolate!

This is how we ask the robot to get ice cream, but nothing changes, we still get what we want.

We can write this as (arrow means movement, circle means scoop).

In fact, all three of the above examples can be written as:

{C, c, c} (3 tablespoons brown):
{B, l, v} (each a banana, lemon and vanilla):
{B, v, v} (one banana, two vanilla):

OK, so instead of worrying about different flavors, we have a simple question: "How many different ways can arrange arrows and circles"

Note that there are always 3 network (3 scoops of ice cream) and 4 arrow keys (we need to go 4 times to go 1-5 containers).

So (ie generally here) there are r + (n-1) positions, and we choose r of them for a loop.

This is like saying "we had a ball r + (n-1) of the pool and we choose r of them." In other words, the question is now like a billiard ball, but with the slightly modified. And we can write like this
note: r+(n−1) is the same as n+r−1):
where n is the number of things to choose from, and we choose r of them (Repetition allowed, order doesn't matter)
Interestingly, we can look at the arrows instead of the circles, and say "we have r + (n−1) positions and want to choose (n−1) of them to have arrows", and the answer is the same:
So, what about our example, what is the answer?
(5+3−1)! = 7! = 5040 = 35
3!(5−1)!3!×4!6×24

In Conclusion

that was a lot to absorb, so maybe you could read it again to be sure!
But knowing how these formulas work is only half the battle. Figuring out how to interpret a real world situation can be quite hard.
But at least now you know how to calculate all 4 variations of "Order does/does not matter" and "Repeats are/are not allowed".
 

Sunday, June 12, 2016

Sets n Vein Diagram(introduction of set)


 

Definition

What is a set? For make it easier to understand me make it simple, set just like collection. We need to specify common property among the things and we gather up all the things that have this common property.

First we need to specify a common property of the "things" (this word will be defined later) and then we gather up all the "things" that have this common property.

 Example of set the items you wear: shoes, socks, hat, shirt, pants, and so on. It just been grouped together.

Notation

. We simply list each element (or "member") separated by a comma, and then put some curly brackets around the whole thing:

Simply we list each element separated by comma and we put some curly bracket around it. This is the curly bracket “ { } “ or called “sets brackets”.

This is the notation for the two previous examples:

{socks, shoes, watches, shirts, ...}

Numerical Sets

If we already define a set, first we need to specify the  common characteristic. We also can do sets in number. Set of even numbers: {..., -4, -2, 0, 2, 4, ...}

This Set of odd numbers: {..., -3, -1, 1, 3, ...}

This Set of prime numbers: {2, 3, 5, 7, 11, 13, 17, ...}

The Positive multiples of 3 that are less than 10: {3, 6, 9}

There also can be sets of numbers that not have common property, we just need to defined the way for example.

{1, 3, 6, 424, 3639, 4427}

{4, 5, 6, 5, 21}

{2, 929, 46282, 42442659, 119244203}

all sets that I just randomly banged on my keyboard to produce.

Universal Set

 
 
 
We used word “thing” and it called universal set. Set is include integers. The universal set would be integers.

More Notation

 
We commonly use capital letter to represent the sets and lowercase letters to represent the element in the sets.
for example, B is b set, and a is an element in B. Same with c and c, and D and d.

Now you don't have to listen to the standard, you can use something like m to represent a set without breaking any mathematical laws (watch out, you can get π years in math jail for dividing by 0), but this notation is pretty nice and easy to follow, so why not?

Also, when we say an element b is in a set b, we use the symbol https://blogger.googleusercontent.com/img/proxy/AVvXsEhwDNglG3ZJVZrCFxEtcWI_yNNVNyk5VqoneNmi2oHJhrYIft5-AG3LDzxQDTLeIGERrOSNke18XbnfIuwLVarsslueYPfKUHqVTkdZnhPoUnhj0nZG3pA6Wf3_khBpfvFJ6L18U6_ohApz0iKj0MchEbyiyJvDDaA=to show it.

And if something is not in a set use https://blogger.googleusercontent.com/img/proxy/AVvXsEiZkZS-42QQXDUG2Nle3Fl2U_uKZMjxDWtGM4VEFH2Rbxp4Lq-9gOrgaV88oODy2PKRy8DYmNAxG-Lw8MtcZ8Ev3Ss5GvQCeJS_8z-bGpI-oz-iAH9K67ddSa4GL0kEEe6xWPlkIaXbUHHB_shf2-Zyc6O6Yfwg_b66c1Wc=.

Example: Set A is {1,2,3}. We can see that 1 https://blogger.googleusercontent.com/img/proxy/AVvXsEhwDNglG3ZJVZrCFxEtcWI_yNNVNyk5VqoneNmi2oHJhrYIft5-AG3LDzxQDTLeIGERrOSNke18XbnfIuwLVarsslueYPfKUHqVTkdZnhPoUnhj0nZG3pA6Wf3_khBpfvFJ6L18U6_ohApz0iKj0MchEbyiyJvDDaA=A, but 5 https://blogger.googleusercontent.com/img/proxy/AVvXsEiZkZS-42QQXDUG2Nle3Fl2U_uKZMjxDWtGM4VEFH2Rbxp4Lq-9gOrgaV88oODy2PKRy8DYmNAxG-Lw8MtcZ8Ev3Ss5GvQCeJS_8z-bGpI-oz-iAH9K67ddSa4GL0kEEe6xWPlkIaXbUHHB_shf2-Zyc6O6Yfwg_b66c1Wc=A

Equality

Two sets are equal if they have the same members. Now, at first glance they may not seem equal, so we may have to examine them closely!

Example: Are b and C equal where:

  • B is the set whose members are the first four positive whole numbers
  • C = {4, 2, 1, 3}

Let's check. They both contain 1. They both contain 2. And 3, And 4. And we have checked every element of both sets, so: Yes, they are equal!

And the equals sign (=) is used to show equality, so we write:

A = B
this the video for set:





 

 

         Introduction to Sets


Subsets

When we define a set, if we take pieces of that set, we can form what is called a subset.

So for example, we have the set {1, 2, 3, 4, and 5}. A subset of this is {1, 2, and 3}. Another subset is {3, 4} or even another, {1}. However, {1, 6} is not a subset, since it contains an element (6) which is not in the parent set. In general:

A is a subset of B if and only if every element of A is in B.

So let's use this definition in some examples.

Is A a subset of B, where A = {1, 3, 4} and B = {1, 4, 3, 2}?

1 is in A, and 1 is in B as well. So far so good.

3 is in A and 3 is also in B.

4 is in A, and 4 is in B.

That's all the elements of A, and every single one is in B, so we're done.

Yes, A is a subset of B

Note that 2 is in B, but 2 is not in A. But remember, that doesn't matter, we only look at the elements in A.

Let's try a harder example.

Example: Let A be all multiples of 4 and B be all multiples of 2. Is A a subset of B? And is B a subset of A?

We can’t check every element of set. We need to get an idea of what the element look like in each then we compare them all.

The sets are:

  • A = {..., -8, -4, 0, 4, 8, ...}
  • B = {..., -8, -6, -4, -2, 0, 2, 4, 6, 8, ...}

By pairing off members of the two sets, we can see that every member of A is also a member of B, but every member of B is not a member of A:

 

So:

A is a subset of B, but B is not a subset of A

Proper Subsets

we need to look at the definition of subset.

Let A be a set. Is every element in A an element in A? (Yes, I wrote that correctly.)

Well, umm, yes of course, right?

So doesn't that mean that A is a subset of A?

This seen not proper yet, so we change the subset to be proper using proper subsets

A is a proper subset of B if and only if every element in A is also in B, and there exists at least one element in B that is not in A.

This little piece at the end is only there to make sure that A is not a proper subset of itself. Otherwise, a proper subset is exactly the same as a normal subset.

Example:

{1, 2, 3} is a subset of {1, 2, 3}, but is not a proper subset of {1, 2, 3}.

Example:

{1, 2, 3} is a proper subset of {1, 2, 3, 4} because the element 4 is not in the first set.

Notice that if A is a proper subset of B, then it is also a subset of B.

Even More Notation

When we say that A is a subset of B, we write A https://blogger.googleusercontent.com/img/proxy/AVvXsEjEQxCvBMtKPfgC0ZH1GRfcowpH04c0HkbDSm0wsR5fnNVL5vtZb18YmREEdnPAoFv9J-O-vzrhRksZj03_sl1UTOWDC2jpNGaaiQM6Jf-0YYvK0xGbv8drZQK1oYujSpWWzzq2x32Go2U03LHGoYeOMKzh4kCjdw=B.

Or we can say that A is not a subset of B by A https://blogger.googleusercontent.com/img/proxy/AVvXsEjY8-sHEWAkOzqKBqn_pQbb8V3xYN6haNOMBZMdnRZbqX3RjwV-j07L9mWA8M25H6JM7xwjiZ1W8TP1OR8Hi7PD7XI4XluE9Vg-c2enRwsRNl4PtQ_fWNwlUAHET8Hk39DETVpYeu7sMp1nqEN9I41ILXEW7CiA_PB6R_w=B ("A is not a subset of B")

When we talk about proper subsets, we take out the line underneath and so it becomes A https://blogger.googleusercontent.com/img/proxy/AVvXsEhpCwq5u67xS8uHIkw7c2U-BCZBI8rBfm0yAekmHBCSaG_kgs4zeE-ISFJ-vVxM6NU1JyKV1NeGMHyNXq5KGvhaEaEdFPKloeglEynOAuGPaU-eGMvpBJv5onvZv26LDHl_WvRQD0wO8aknhJsEfI4WMot-3lKVpBg_u4gBm_M=B or if we want to say the opposite, A https://blogger.googleusercontent.com/img/proxy/AVvXsEiZPiWfu3P8iBHs608ccuMZ7FDvAl3n3BOnLKfhrERoxmrJVVQZ6VRpBBvFeSNuqSczZ7E_fJnHQIhTlLhis2O_eGgPPGfWKdqMVnmbZKnzZNhU3nVjAuxmxMZHW-qbsnSnumsH-WN81t1hMaIfXrhyphenhyphenxESRV_zNP2GCPCFWXSmeuuir=B.

Empty (or Null) Set

This is little bit weird and also make little bit confuse.

 

As an example, think of the set of piano keys on a guitar.

"But wait!" you say, "There are no piano keys on a guitar!"

And right you are. It is a set with no elements.

This is known as the Empty Set (or Null Set).There aren't any elements in it. Not one. Zero.

It is represented by https://blogger.googleusercontent.com/img/proxy/AVvXsEgsPWv-Z9rUNPiUY3LPmZfv9e8gLTXus_yxgsHibpLkTBnbfQD68bDOO6EwZZgWE-C6SpKPCH_HAede8hZg8Dm1ddWPzxuzulsRz2shMz6MaS4QRB0aT8zpuTVeA57OS_GQx2m_KIJ45tP59bSjyTHLF3s=

Or by {} (a set with no elements)

Some other examples of the empty set are the set of countries south of the south pole.

So what's so weird about the empty set? Well, that part comes next……

Empty Set and Subsets

So l back to our definition of the subsets. For example,we have a set A. We won't define it any more than that, it could be any set. Is the empty set a subset of A?

Going back to our definition of subsets, if every element in the empty set is also in A, then the empty set is a subset of A. But what if we have no elements?

It takes an introduction to logic to understand this, but this statement is one that is "vacuously" or "trivially" true.

A good way to think about it is: we can't find any elements in the empty set that aren't in A, so it must be that all elements in the empty set are in A.

So the answer to the posed question is a resounding yes.

The empty set is a subset of every set, including the empty set itself.

Order

No, not the order of the elements. In sets it does not matter what order the elements are in.

Example: {1, 2, 3, 4} is the same set as {3, 1, 4, 2}

When we say "order" in sets we mean the size of the set.

Just as there are finite and infinite sets, each has finite and infinite order.

For finite sets, we represent the order by a number, the number of elements.

Example, {10, 20, 30, 40} has an order of 4.

For infinite sets, all we can say is that the order is infinite. Oddly enough, we can say with sets that some infinities are larger than others, but this is a more advanced topic in sets.

 

Sets n Ven Diagram

Sets and Venn Diagrams part II

Sets

 
A set is a collection of things.
For example, the items you wear is a set: these would include shoes, socks, hat, shirt, pants, and so on.
You write sets inside curly brackets like this:
{socks, shoes, pants, watches, shirts, ...}
You can also have sets of numbers:

Ten Best Friends

You could have a set made up of your ten best friends:
  • {alex wong, tony blair, john casey, honey dew, erin malik, francis , glen, huntera, irah, jade}
Each friend is an "element" (or "member") of the set (it is normal to use lowercase letters for them.)


Now let's say that alex wong, john casey, honey dew and huntera play Soccer:
Soccer = {alex wong, john casey, honey dew, huntera}
(The Set "Soccer" is made up of the elements alex wong, john casey, honey dew and huntera).

And casey, drew and jade play Tennis:
Tennis = {casey, drew, jade}
You could put their names in two separate circles:
 

Union

You can now list your friends that play Soccer OR Tennis.
This is called a "Union" of sets and has the special symbol :
Soccer Tennis = {alex wong, john casey,honey dew, huntera, jade}
Not everyone is in that set ... only your friends that play Soccer or Tennis (or both).
We can also put it in a "Venn Diagram":

Venn Diagram: Union of 2 Sets
A Venn Diagram is clever because it shows lots of information:
  • Do you see that alex, casey, drew and hunter are in the "Soccer" set?
  • And that casey, drew and jade are in the "Tennis" set?
  • And here is the clever thing: casey and drew are in BOTH sets!

Intersection

"Intersection" is when you have to be in BOTH sets.
In our case that means they play both Soccer AND Tennis ... which is casey and drew.
The special symbol for Intersection is an upside down "U" like this:
And this is how we write it down:
Soccer Tennis = {casey, drew}
In a Venn Diagram:

Venn Diagram: Intersection of 2 Sets

 this is the video


Which Way Does That "U" Go?

 
Think of them as "cups": ∪ would hold more water than ∩, right?
So Union ∪ is the one with more elements than Intersection ∩

Difference

You can also "subtract" one of the set from another.
For example, taking Soccer and subtracting Tennis means people that play Soccer but NOT Tennis ... which is alex wong and huntera.
And this is how we write it down:
Soccer Tennis = {alex wong, huntera}
In a Venn Diagram:

Venn Diagram: Difference of 2 Sets


Friday, June 10, 2016

measures of central tendency(how to find Mode)

How to Find the Mode or Modal Value

 
Mode is always choose the number that always appear most

Finding the Mode

To find the mode,  first we need to put the numbers in order, then count how many of each number. A number that appears most often is the mode.

Example:

3, 7, 5, 13, 20, 23, 39, 23, 40, 23, 14, 12, 56, 23, 29
In order these numbers are:
3, 5, 7, 12, 13, 14, 20, 23, 23, 23, 23, 29, 39, 40, 56
This makes it easy to see which numbers appear most often.
the number that most often is 23

Another Example: {19, 8, 29, 35, 19, 28, 15}

Arrange them in order: {8, 15, 19, 19, 28, 29, 35}
19 appears twice, all the rest appear only once, so 19 is the mode.
How to remember? Think "mode is most"

More Than One Mode

We can have more than one mode.

Example: {1, 3, 3, 3, 4, 4, 6, 6, 6, 9}

3 appears three times, as does 6.
So there are two modes: at 3 and 6

this is the video tutorial for more example.


 
 

measures of central tendency (how to find median)

How to Find the Median Value

It's the middle of a sorted list of numbers.

Median Value

The Median is the "middle" of the numbers.

How to Find the Median Value

it is easy to find the median, first step we place the number in order then we need to find the middle.

Example: find the Median of 12, 3 and 5

Put them in order:
3, 5, 12
The middle is 5, so the median is 5.

 

Example:

3, 13, 7, 5, 21, 23, 39, 23, 40, 23, 14, 12, 56, 23, 29

 we put those numbers in order :
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 39, 40, 56

There are fifteen numbers. Our middle is the eighth number:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 39, 40, 56
 
The median value of this set of numbers is 23.

(It doesn't matter that some numbers are the same in the list.)
this is the video for  median
 

Two Numbers in the Middle

BUT, with an even amount of numbers things are slightly different.

In that case we find the middle pair of numbers, and then find the value that is half way between them. This is easily done by adding them together and dividing by two.

Example:

3, 13, 7, 5, 21, 23, 23, 40, 23, 14, 12, 56, 23, 29

put those numbers in order:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 40, 56

There are now fourteen numbers and so we don't have just one middle number, we have a pair of middle numbers:
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 40, 56

In this example the middle numbers are 21 and 23.
To find the value halfway between them, add them together and divide by 2:
21 + 23 = 44
then
44 ÷ 2 = 22
 
So the Median in this example is 22.

(Note that 22 was not in the list of numbers ... but that is OK because half the numbers in the list are less, and half the numbers are greater.)

measures of central tendency (how o find mean)



How to Find the Mean

The mean is the average of the numbers.
It is easy to calculate: add up all the numbers, then divide by how many numbers there are.
In other words it is the sum divided by the count.
 

Example 1: What is the Mean of these numbers?

6, 11, 7
  • Add the numbers: 6 + 11 + 7 = 24
  • Divide by how many numbers (there are 3 numbers): 24 / 3 = 8

The Mean is 8


Why Does This Work?

It is because 6, 11 and 7 added together is the same as 3 lots of 8:
 
It is like you are "flattening out" the numbers

Example 2: Look at these numbers:

3, 7, 5, 13, 20, 23, 39, 23, 40, 23, 14, 12, 56, 23, 29
The sum of these numbers is 330
There are fifteen numbers.
The mean is equal to 330 / 15 = 22

The mean of the above numbers is 22

this is the video

Negative Numbers

do you know how to handle  negative numbers? Adding a negative number is the same as subtracting the number (without the negative). For example 3 + (−2) = 3−2 = 1.
By knowing this, let us try an example:

Example 3: Find the mean of these numbers:

3, −7, 5, 13, −2
  • The sum of these numbers is 3 − 7 + 5 + 13 − 2 = 12
  • There are 5 numbers.
  • The mean is equal to 12 ÷ 5 = 2.4

The mean of the above numbers is 2.4

Here is how to do it one line:
Mean =  3 − 7 + 5 + 13 − 2  =  12  =  2.4











 
5
5