Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Thursday, March 25, 2010

How to help a daughter with Pre-Algebra, with a $5000 Mathematica seat

Wolfram ResearchImage via Wikipedia
(Actually, you will pay less for Mathematica than I do.  I believe you will pay $200)

Here is a session in Mathematica's Notebook REPL (Read-eval-print-loop).  If you are simply performing an operation on the last bit of output, simply type "%".  Remember, "Solve" works on equations, and inequalities require the use of "Reduce".  In "Reduce", don't be thrown by Mathematica taking care to note the domain of the variables.  "Expand" can force Mathematica to carry out all the productions in the expression.  "MapAt" is great to change just one part of an expression.  "Remove["Global`*"];" is how you can just re-evaluate a whole Notebook from scratch, and not have to worry about conflicts with earlier assignments as you were exploring different implementations and techniques.  "RegionPlot" is just the thing for viewing inequalities.

In:= Remove["Global`*"];

In:= slope[{x0_,y0_},{x1_,y1_}]:=(y1-y0)/(x1-x0)

In:= slope[{-6,3},{2,-5}]
Out= -1

In:= slope[{1,3},{-2,-1}]
Out= 4/3

In:= Solve[{-3x-y==2,-4x+2y==8},{x,y}]
Out= {{x->-(6/5),y->8/5}}
In:= N[%]
Out= {{x->-1.2,y->1.6}}

In:= Solve[-3x-y==2,{y}]
Out= {{y->-2-3 x}}

In:= Solve[-4x+2y==8,{y}]
Out= {{y->2 (2+x)}}
In:= MapAt[Expand[#]&,%,{1,1}]
Out= {{y->4+2 x}}

In:= Solve[{y-x==3,2x+y==-2},{x,y}]
Out= {{x->-(5/3),y->4/3}}
In:= N[%]
Out= {{x->-1.66667,y->1.33333}}
In:= Reduce[y-x<=3,{y}]
Out= x\[Element]Reals&&y<=3+x
In:= Reduce[2x+y<-2,{y}]
Out= x\[Element]Reals&&y<-2-2 x

In:= RegionPlot[{y-x<=3,2x+y<-2},{x,-5,5},{y,-5,5}]
Out=


For some stupid reason, I alway forget "Rise Over Run" for the slope.  So now I can just cut and paste.
Reblog this post [with Zemanta]

Thursday, January 7, 2010

Math - could slack off, and still get good grades

To be honest, what I liked best about math was that I could slack off and still be at or near the top of the class. The harder the math got, the better I did, relative to the rest of the class.
A hoodie with the w:University of California, ...Image via Wikipedia

Ultimately, I got a pretty decent undergrad math education from UCLA, took some graduate level algebra as an undergrad. I never had to rise above a loping slacker's pace.

Lacked and would have appreciated: category theory (zip zero zilch taught), better differential equations (I got a decent grade with no need to understand the subject, which is lame), continuous distributions and how they relate to the Fourier transform (if this was taught to me, I don't remember it).

It is shocking how much I need to learn now was invented/developed after I graduated from college. Before 1993 - No distributed revision control, no distributed operating systems, no decent theory of just-in-time compiling, no decent published real-world examples of Bayesian probability, Judea Pearl's theory of causality wasn't invented yet, no decent cryptographic hashes, no Bloom filters, no decent introductory texts on decision analysis. My wife says that is why she doesn't want our daughter to go into computers - you have to keep learning and forget the crap that just doesn't matter anymore. Whatever. I think it is inescapable that you have to keep learning just to keep somebody from eating your lunch.


Mathematical FlowerImage by hyperboreal via Flickr
Frankly, I am glad I didn't do well enough, overall, to attempt a post-graduate degree in math or computers, back in 1993. A lot of what passes in academia today is pretty weak sauce, in applied math and computer science. God bless the IntarWebs. I can just grab the info I need and go. One problem, the tempo has increased.
Reblog this post [with Zemanta]

Friday, November 6, 2009

Benford's Law: preference for the starting digit of 1

Frequency of first significant digit of physic...Image via Wikipedia

Very nice write-up of Benford's Law: why so many scientific constants and other published numbers start with the digit "1".
I have seen Knuth's write-up, and, I admit, could not make heads-or-tails of it. This is very nicely and simply explained.
Benford's Law: "

Dow Illustrates Benford's Law

To illustrate Benford's Law, Dr. Mark J. Nigrini offered this example:

'If we think of the Dow Jones stock average as 1,000, our first digit would be 1.

'To get to a Dow Jones average with a first digit of 2, the average must increase to 2,000, and getting from 1,000 to 2,000 is a 100 percent increase.

'Let's say that the Dow goes up at a rate of about 20 percent a year. That means that it would take five years to get from 1 to 2 as a first digit.

'But suppose we start with a first digit 5. It only requires a 20 percent increase to get from 5,000 to 6,000, and that is achieved in one year.

'When the Dow reaches 9,000, it takes only an 11 percent increase and just seven months to reach the 10,000 mark, which starts with the number 1. At that point you start over with the first digit a 1, once again. Once again, you must double the number -- 10,000 -- to 20,000 before reaching 2 as the first digit.

One of Knuth’s reward checksImage via Wikipedia

'As you can see, the number 1 predominates at every step of the progression, as it does in logarithmic sequences.'

"
Reblog this post [with Zemanta]