Tuesday, August 31, 2010

Detecting outliers through boxplots of the features

This function detects univariate outliers simultaneously using boxplots
of the features:

require(dprep)

data(diabetes)

outbox(diabetes,nclass=1)

box plots online

B.O.D.M.A.S...please tell me u remember?

Okay, I know I should keep this blogging thing consistent but I actually have to pay attention to biostatistics sometimes. Speaking of this class, the other day I waltzed in, late as usual to get my exam results...not bad..not bad at all. Apparently, not everyone did well in the exam, people couldn't compute basic math and hence the tantrum that my instructor was throwing that morning.
So I walk in and take my exam and as i'm perusing thru, he starts...I'm very dissapointed in some of you, I was shocked to see that people couldn't do basic math, this messed up their entire flowcharts and histograms..let's review..

19+22-40/52+rt16-5 is equal to what?

The teacher asks what the process was and since most of the people in my class went to elementary here they have this whole thing about Mary's mother and grandmother doing something..and I'm like what?? I don't know what the hell ure talking about...so everyone in class is shocked wondering how I got ! my ass into college and didn't go through elementary.

So the teacher turns to me and asks just how I did the freaking problem if I didn't know the basic ruless. My response: BODMAS....yaani the one mrs.Gitonga taught me..if you don't know...
  • Brackets
  • Of
  • Division
  • Multiplication
  • Addition
  • Subtraction

The man looks at me and doesn't really understand what the crap I'm talking about. So I get up and head to the board and explain myself while doing the freaking problem. Most of these punks are still lost and so it takes another 20 mins before everyone understands what the hell I'm talking about.

Response: Wow...u learnt that from Africa? or did u read it on the internet. My response...Mary and her grandmother didn't do very well in teaching you math.

that's my piece.


bodmas problems

Matrix Algebra for Dummies

A free read on basic matrix algebra.

Also some video lessons here.

algebra for dummies free online

Trigonometric Identities - Basic Identities

trigonometric identities are specific equalities that express one trig function in terms of other trig functions. They are fairly straightforward, but they take some work to derive them. If you are comfortable with simple derivations, you shouldn't have any problems though. Personally, I find it easier to remember the basic set of identities, and derive the more complex ones from those, rather than trying to memorize all of them... although some people are more comfortable just to memorize them.

The basic identities are traditionally visualized with a triangle formed by a radius r, length x, and height y:


The basic trig definitions can easily be seen:
Sin(theta) = y/r..... opposite/hypotenuse
Cos(theta) = x/r..... adjacent/hypotenuse
Tan(theta) = y/x..... opposite/adjacent

If we now apply the Theorem of Pythagoras, we can see:
r^2 = x^2 + y^2
Dividing everything by r^2 gives:
1 = (x^2)/(r^2) + (y^2)/(r^2)
1 = (x/r)^2 + (y/r)^2
And then, subbing in the basic definitions, we get:
1 = [Cos(theta)]^2 + [Sin(theta)]^2

And that is the first basic identity. Nothing to it. It's proper name is! the Pythagorean Trigonometric Identity. I'll rewrite it in p! roper no tation to clean it up a bit... (Blogger is a pain with superscripts and fonts)


Another basic relationship starts with:
Tan(theta) = y/x
But, then sub in the Sine and Cosine definitions (isolated for x and y, respectively) to give
Tan(theta) = (r*Sin(theta)) / (r*Cos(theta))
Tan(theta) = Sin(theta) / Cos(theta)

And that's it again. This is call! ed the Ratio Identity:


Those are now two of the simplest trig identities from which most of the others can be derived.

trigonometric identities

Algebra: Surds

Surds are numbers left in 'square root form' (or 'cube root form' etc). They are therefore irrational numbers. The reason we leave them as surds is because in decimal form they would go on forever and so this is a very clumsy way of writing them. (See here for notes and examples )

Skills needed to answer GCSE questions
  • Using Surds in calculations
  • Simplifing Surds
  • Rationalise Surds (which needs you to remember the difference of 2 squares)

    Helpful resources, examples and links

     

    BBC Bitesize is always good

    GCSE Maths tutor - technical but some worksheets and videos

    Some people fing watching a YouTube video can help, but be aware that they use real Maths teachers

    MyMaths Surds1 goes through the topics in a gentle way.
    Surds2 - a little harder


  • surds maths

    Kyle Bobby Dunn - Rural Route No. 2 (Standard Form, 2010)


    Kyle Bobby Dunn - Dissonant Distances








    Standard Form put out a limited edition 3" CD-R from the new master of minimal drone, Kyle Bobby Dunn. Only two songs, "Dissonant Distances" & "Senium III," but they're both around the 10 minute mark and are as gorgeous as can be. Of course "Dissonant Distances" has its moments of, well, dissonance, using a strange sort of muted industrial ambience. It's a bit more textured than his previous stuff, a little more static & crackle as opposed to smothered strings. Not what I was expecting and in a very awesome way.

    The second track is the slow moving Stars Of The Lid style drone you've come to know & love. Soft, delicate, and smooth, anything but ambient backgrou! nd sounds. The layers of beauty suck you in & hypnotize you. L! ovely to nes emanating off the golden lakes in the clouds. Seriously special stuff.

    I almost hope Dunn isn't going the route of Aidan Baker, putting out 30 releases every year because honestly, I can't do that with another artist who's this good. It's bound to either empty my wallet or put me in a deep funk knowing I can't have it all. Most likely the former.

    What is Standard Form

    Converting Point-Slope Form to Standard Form

    I previously described how to obtain the equation of a line, and how to express that in both point-slope form and standard form. While both equations describe the exact same line, sometimes you may be asked to express the line in a specific way, and you need to be able to manipulate and rearrange the provided equation to make it look like the other form. I will show an example of how this can be done.

    Reminders (refer to the posts linked above for more details)

    Point-slope looks like this:
    (y-y1) = m(x-x1), which is the general way of saying y=mx+b

    Standard form looks like this:
    Ax + By = C

    Example: Express the equation y=5x-10 in standard form. State the values for A, B, and C.

    Basically, what you want to do is move all the x and y terms over to one side, and move the constants (terms with no variables) over to the other. Combine and simplify where possible. That's all there is to it. "A" will be the term left over in front of x, "B" will be with y, and C will be the value not attached to a variable.

    y=5x-10
    10=5x-y
    So:
    5x-y=10
    A=5, B=(-1), C=10
    (remember the standard form has a "+", so a "-" in your answer implies a coefficient of (-1).

    Let's try another one:

    Example:
    Express the equation y=(4/ 3)x+2 in standard form. State the values for A, B, and C.

    This one works the same way, but there is something else that can be done, as I will demonstrate.

    y=(4/3)x+2
    (-2)=(4/3)x-y
    So:
    (4/3)x-y=(-2)
    A=(4/3), B=(-1), C=(-2)
    There is nothing wrong with this answer. It is properly rearranged, and the coefficients have been stated. However, usually it is a good idea to not have fractions (ie. have nothing in the denominator). So, to do this, you work our final answer a bit further, so that all the values are in the numerators.

    (4/3)x-y=(-2)
    Multiply all terms by 3, to remove it from the denominator of the first term. This gives:
    4x-3y=(-6)
    A=4, B=(-3), C=(-6)

    Again, this answer describes the exact same line as the initial answer without the extra moves, so technicall! y, they are both right. It is just a common convention to keep things in the numerator wherever possible.

    Converting from the Standard Form to the Point-slope form is basically just the reverse. Try it for yourself with these examples!

    What is Standard Form