The Open Source Swiss Army Knife

/programmingToolBox/statistics/
/programmingToolBox/statistics/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /programmingToolBox   /statistics 
Permalink: /var/sirfsup/programmingToolBox/statistics/counting.txt
Title: add
article options : please login   |  raw source view  

http://www.themathpage.com/aPreCalc/permutations-combinations.htm

read that first. It details "theory of counting". If you can count, you can
do factorials and permutation problems. It goes on to consider permutations
(see below). Since it's just a theory of counting, it is in counting.txt not
probability.txt

"If the sample space consists of n sample points, then there are 2n events" because there are two possible values for each member of the sample space.

definitions

permutation: each different arrangement of all or part of a set of objects

multiple outcomes and counting the permutations

FOR THE TIME BEING LETS ASSUME THAT THERE IS NO WAY TO CHOOSE THE SAME SAMPLE FROM THE SAMPLE SPACE TO MAKE ANY SUBSPACE.

when is the probability = m*n?

"If something can be chosen, or can happen, or be done, in m different ways,
and, after that has happened, something else can be chosen in n different
ways, then the number of ways of choosing both of them is m· n."
source = http://www.themathpage.com/aPreCalc/permutations-combinations.htm

i.e., when something can be done m different ways and another thing can be chosen n different ways

what are the number of possible probabilities of choosing 2 numbers from 4? 4 for the first letter and 3 for the second = 4*3 = 12 possible ways

S = { ab ba ca da

ac bc cb db

ad bd cd dc }

what are all the permutations of xyz? S = { xyz, xzy, yxz, yzx, zxy, zyx }

what are the total permutations for all four letters? 4 for the second .. 3 for the second .. 2 for the first and 1 for the last. So one choice there will be 4*3*2*1 = 24 possbilities

question: 5 different books on the shelf, how many different ways could they be rearranged? = 5!

there are 6! permutations of the letters in the word square. In how many of them is "r" the second letter?
1*5*4*3*2*1 = 5!

permutations of less than all: combinations

This question is for example "the number of combinations of 4 things taken 3 at a time"

question: what are the permutations of 4 different things taken 2 at a time? (4P2)

answer: grouping matters, so it is 4!/(4-2)! = 4 * 3 * 2 / 2 = 12

8-sub P 3-sub ==== "taking 3 at a time from 8 different thing, what is the number of combinations can be made?" = 8 * 7 * 6

or, 8 ways to choose the first, 7 ways to choose the second, 6 ways to choose the third

combinations are different from permutations. Now, I take back saying "FOR THE TIME BEING LETS ASSUME THAT THERE IS NO WAY TO CHOOSE THE SAME SAMPLE FROM THE SAMPLE SPACE TO MAKE ANY SUBSPACE."
permutations the numbering or position of the elements in the chosen sets are the same. My teacher didn't really explain this satisfactorily. For the sake of figuring permutations, we have to take into account if the ordering in the selections is important. If it is, then we calculate as above. However, for combinations, we are simply concerned with the number of combinations of what we can get out.

To use abcd again, if we choose sets of three and order is not important, (ie we simply want the combinations) we get
S = { abc abd acd bcd }

side note about combinations and the binomail theorem

binomial coefficients are advanced probability because they are not in my book. I guess from reading stuff on the web that:

"Often C(n,r) [ the combinations possible in r-element subset of n elements] is written as a binomial coefficient,"

which is written one number on top of the other number. For example,

(n)
(r)

yes, that's one big parens around the n and r variables

fundamental theory of counting

P(n,r) = C(n,r) * P(r,r)

where C(n,r) = n!/r!(n-r)!
and P(r,r) = r!

so P(n,r) = n!/((n-r)!r!)

The relationship between the two is that if we are choosing n combinations of m elements, each combination will have m! permutations. Please see http://www.themathpage.com/aPreCalc/permutations-combinations.htm

in general, C(n,k) = P(n,k)/k!

or, in general, number of combinations = (total number of
permutations)/(number of permutations in each set). So, in figuring the
permutations, we just divide the number of permutations by the number of
permutations of each set.

in general, C(n,k) = (n-k)!/k! or equivalently from the textbook, C(n,k) =
n!/k!(n-k)!

summary of instances where the set contains all different elements

Problem: You have 5 shirts, but will select only 3 for your vacation. In how many different ways can you do this?

answer: C(5,3) = 5!/3!(5-3)! = 5*4*32/322 = 52 = 10. The order in which
you select them does not matter, so we use combinations not permutations to
figure the combinations.

permutations with recurrences

P(n,r) = nr

(ie for a bit, there are 2 values per bit, for a 4 bit number there are 24 combinations

number of committees of any size

this is 2n -1 would give us all possible COMBINATIONS from n down to 1. The zero subtracts out the time when there are only zero members in the committee.

so, for 4 people, there are 7 possible committees which can be formed.

The other formula

We are not worried about either combinations of individual elements, we simply
want to know how many ways we can combine.... this is the footaball example,
they play 12 games what are the chances they will have 7 wins, 2 losses and a
tie

  • 12!/7!2!1!

will give the possible ways of forming the subsets envisioned

in these cases, the combinations is simply 1, we want to know what the
permutatinos in the combinations are. It is a strange, rare formula.

nother example is given here:
http://www2.chass.ncsu.edu/garson/pa765/probability.htm
in about the page-middle


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top