Saturday, February 03, 2007

Mapping and such

Well another Saturday brings another 8 hour shift.

Pretty decent week, went and got my DL renewed so now I will actually look like me, instead of the old fat me. Good times.

In general it has been an ok week. In stats we are doing permutation and combinations, probabilities and binomial events.

Permutations and combinations deal with have a group of things and determining how many ways you can combine the things. ie if you have 20 people how many ways can you randomly combine them into a comittee of 3 people.

In permutations we are concerned with the order of people, in combinations we are not
given..

WCW
WWC
CWW

In a permutation those are all different sets since the order is relevant, but in combinations they are all the same set, 2Ws and 1C.

They are noted 3P20 and 3C20 respectively.

In order to figure these out we need to use factorials. Whats a factorial you say? On your calculator it may have a label x! If it does, then that is a factorial.
What it does is this 5! = 5 x 4 x 3 x 2 x 1. So 5! = 120

In the example about 3P20 it looks like this
20!/(20-3)!
This will generate a couple of big numbers, fortunately a lot of the calculation will cancel out.
20 x 19 x 18 x 17!/17!
the 17! will cancel leaving us with 20x19x18x17 = 6840 ways to do it when order matters.

In combinations we would get the following
3C20 =
20!/((20-3)!3!)
which becomes
6840/(3 x 2 x 1 )
or
6840/6
or
1140 different ways when the order does not matter.

We also did probabilities.
In our examples we had a branching tree diagram with a 40% chance, which we will call (p) going one way and a 60% chance, which we will call (q) going the other.

q is p's complement. They add up to 100% or 1

We did it as a survey scenario.
we figured out the probability of asking 3 people and covering all the scenarios.
We drew a tree diagram to illustrate this point and then worked out the probability of asking three people and getting the responses as ppp or qpq or qqq. It turns out all you have to do is multiply the probabilities together.
P(p AND p AND p) = P(.4 x .4 x .4) = 0.064 or 6.4%
for
P(q AND q AND q) = P(.6 x .6 x .6) = .216 or 21.6%
for
P(q and P and q) = P(.6 x .4 x .6) = .144 or 14.4%

And then we moved into binomials. As nice as the tree diagram is. If we have two choices and the probability of choice p = .20 and choice q=.80 and we have 30 trials, and need to find the probability of the branch that has 3 p choices, we are in for a lot of work? Or are we?
Turns out we can use combinations as well as the fact that some of the branches will have the same probability ie in the above example
P(qqp) = .6 x .6 x .4 = .144
P(pqq) = .4 x .6 x .6 = .144
P(qpq) = .6 x .4 x .6 = .144
In the end we can make a formula that needs to have a few variables.
1) N = number of trials
2) X = number of instances of p
3) Probability of p and q
which is....

xCn*p^x*q^(n-x)

With the combination formula and my initial example

n = 3 trials
x = 1 (One instance of P, should be .144 *3 since we have three ways of getting that branch)
p = .4
q = .6

= 3!/((3-1)!1! * .4^1 * .6^(3-1)

= 3 * 2 * 1 / ( 2 * 1 ) (1) * (0.064) * (.36)
= 6 / 2 * .064 * .36
= 3 * .064 * .36
= .432

So now with

n = 30
p = .2
q = .8
What are the chances of getting at least 3 p answers or outcomes?
= 30!/(30-3)!3! * .2^3 * .8 ^(30-3)

= 30 x 29 x 28 x 27!/27! * 6 * .008 * .002417852
= 4060 * .008 * .002417852
= 0.0785318
So we have a 7.85% chance of achieving 3 p answers in this arrangment.

Then we learned how to figure out the expected value, or the mean. Which in this case turns out to be n * p

in the 30 example = 30 x .2. We would expect to get 6 p answers

Then we learned the binomial standard deviation = sqrt(n*p*q), = sqrt (30*.2*.8) = 2.19089.

We can use this to determine values that would be unusual.
Unusual values are determined as being outside the range created by the expected value +/- 2 x the standard deviation

6 +/- 2(2.19089)
or about 1- 10. so common values in this scenario would range from 2 - 9.

Thats stats. Quiz on Friday. Pretty sure I have a half way decent grip in the material.

Geophysics has been pretty quiet lately. We have been drawing 3d layout diagrams.

Geology we started on carbonates. Sedimentary rocks formed by life and chemical processes such as reefs. We have also started mapping strike lines and outcroppings on maps in the lab. Stats I can kind of explain here. Strike maps, I'm not gonna bother trying.

Java. Computer programming. Nuff said.
intro to networking. Nuff said.

My goal in these classes is to get my stuff done ASAP, so I can help everyone else. I will end up helping them anyhow so best to get my stuff out of the way first! :D

Left to do today.
Java program.
Java logic assignment.
Stats homework.
Pay rent.

No comments: