### Oct

#### 6

# How much matrix algebra do statistics students REALLY need?

Filed Under Algebra, Dr. De Mars General Life Ramblings, statistics | 4 Comments

Following a discussion using matrix algebra to show computation in a Multivariate Analysis of Variance, a doctoral student asked me,

“Professor, when will I ever use this? Why do I need to know this?”

He had a valid point. I’m always asking myself why I’m teaching something. Is it because it interests me personally, because it is in the textbook or because students really need to know it.

Let’s take some things about matrix algebra we always teach students in statistics.

*What conformable means and why it might matter*

Two matrices are conformable if they can be multiplied together. When you multiply two matrices, the row of the first matrix will be multiplied by the column of the second matrix. You sum the products and that is the first element in the matrix. You repeat this until you have multiplied all of the rows in the first matrix by all of the columns in the second.

So — you can multiply a 2 x 3 matrix by a 3 x 2 matrix but not vice versa.

Multiplying a matrix of dimension a x b and a matrix of dimension c x d will give you a resulting matrix with a rows and d columns, that is, of dimensions a x d .

This can give you results that sometimes seem counter-intuitive, like that the product of a 1 x 3 matrix and a 3 x 1 matrix is a 3 x 3 matrix.

It may seem weird that the result of matrix multiplication can either be a larger matrix than both of the matrices you multiplied, or smaller than both of them, but there it is.

If both matrices are square, that is, of dimension n x n, then the resulting product will also be an n x n matrix.

And, of course, any matrix can be multiplied by its transpose because the transpose of an m x n matrix will always be n x m .

If a square matrix is of full rank, it means that none of the rows are linearly dependent. If you DO have linear dependence, it means you have redundant measures. Now, I could go on to prove this mathematically and all of it is very interesting to me.

I question, though, whether you really need to know anything about matrix algebra to understand that redundant measures are a bad thing.

Do you need matrix algebra to explain that we are going to apply coefficients (do you even need to refer to it as a vector?) to the values of each variable for each record and get a predicted score such that

predicted score = b0 + b1X1 + b2X2 …. b.Xn

When I was in graduate school, calculators that did statistical analyses, even as simple as regression, cost a few hundred dollars which was the equivalent of three months of my car payment. Computer time was charged to your department by the hour. So … my first few courses, I did all of my homework problems using a pencil and paper, transposing and inverting matrices – and it was a huge pain in the ass.

Then, I got a job as a research assistant and one of the perks was hours of computer time. I thought I’d died and gone to heaven. It took me less than half an hour to get all of my homework done using SAS (which ran on a mini-computer and spit out printouts that I had to walk across campus to pick up).

My students are learning in a completely different environment. So … do they need to learn the same things in the same way I did? This is a question I ponder a lot.

### Oct

#### 2

# Matrix Algebra, Just Because

Filed Under Algebra, statistics | 1 Comment

I was talking to a friend of mine today who had taken a test for a new job recently and he had a hard time with the math portion of it. We were in college about the same time and he did perfectly fine in math, but it had been a while. This got me to thinking that I should review things like matrix algebra from time to time, just because it has been a while since I had any need to multiply a matrix without a computer. Well, actually, I can’t imagine that I will ever have such a need but since I’m teaching multivariate statistics and the textbooks generally have a lot of matrix algebra, I thought I should brush up on it whether I ever need it or not.

I had the normal equations for regression drilled into my brain in graduate school and there was a time in my life when I actually had spare time when I found solving systems of linear equations something amusing to do. All of that was a very long time ago.

So …. as I sit here thinking what do my students need to know, I run into the Goldilocks problem yet again. Nothing seems just right. Teaching multiplying a scalar by a matrix seems a waste of time, no matter how brief. All you do is multiply every number in the matrix by that value. Okay, got it.

They should know what an Identity matrix is. This could actually have some useful implications in statistics. If your correlation matrix is close to an identity matrix, with 1 in the diagonals and 0s in the off-diagonal then it tells you that your variables are uncorrelated. If you analyzed a matrix of random data, this is exactly what you would expect to get.

If you multiply a matrix by the identity matrix, I, you are going to get the original matrix as a result, hence the name, identity matrix.

IA = A

This is analogous to the identity property of scalar (that is, regular numbers, not matrices) multiplication that 1X = X

The determinant of a matrix is, for a 2 x 2 matrix, of this form

a b

c d

is equal to

(ad – bc)

To find the inverse of a matrix, the reciprocal of the determinant, that is 1 / (ad-bc), in the case of our same 2 x 2 matrix is multiplied by the following matrix

d -b

c -a

Here is a really good Khan Academy video on finding the inverse of a matrix.

This is particularly important in statistics because you will occasionally get a message on your output that the “determinant is zero” and it would be helpful to you if you understood what that meant and why it was important.

One important point here is that you need the determinant to find the inverse of a matrix. For example, to find the vector of regression coefficients you would use this equation

Notice here that you need to take the inverse of the product of the transpose of the X matrix and the X matrix. What if the determinant is zero? Well, you can’t divide by zero – SO THERE IS NO SOLUTION.

At this point, you want to start to chase down why the determinant is zero. Do you have redundant measures? Is there no variance in the sample?

All of this is very interesting to me personally, but aside from that, I keep asking myself whether the students really need an in-depth understanding of matrix algebra when it is all done by a computer. I really don’t know the answer to that, which is why I keep thinking about it.

### Sep

#### 9

# No wonder kids hate math

Filed Under Algebra, computer games, Dr. De Mars General Life Ramblings | 3 Comments

I’m working on a section of a game that teaches fractions. If a player misses the question about where to meet up with the returning hunter, he or she gets sent to study. There is a movie that plays before this about needing to get back to the camp before dark.

Here is the question,

*“The sisters begin to worry their brothers won’t make it back by dark. They start down the trail to meet them. They decide to stop and wait at the spot where their brothers will be 3/4 of the way back to camp. How far FROM the camp will the girls be?”*

I used this question because I want students to think about a few ideas:

- Distance between two points can be thought of as a whole.
- If you are a/b distance FROM point X, the remaining distance TO point X is 1 – a/b . Of course, I don’t expect them to state it like that.
- 1/4= 2/8
- Number lines can be numbered in either direction. You can have 0 on the left or 0 on the right. The distance will be the same. The size of each interval will be the same.

These are kind of important ideas in math – equivalence, the arbitrary nature of labeling points on a line.

Students can click on GIVE ME A HINT, and a hints page pops up that explains, among other things, why you were wrong if you answered that the sisters would be 3/4 of the distance to the hunting grounds FROM the camp. If, even after reading the hints, (or if they skip the hints and just guess, we’re talking kids, after all) they get the problem wrong, the player is sent to watch a video clip explaining the problem, and then has to take a quiz to get back to the game.

SO … I had the thought instead of writing the quiz questions out of thin air, I might read what some more experienced teachers were giving to students in this grade as math problems. After all, I haven’t taught middle school math since the 1980s. I went to several sites, I even purchased some things like “One year of fifth-grade homework problems” etc.

When I looked at page after page of what students are being given as homework assignments, the only thing I could think was “*Are you fucking kidding me? No wonder kids hate math.”*

All of the homework was like this:

1/4 + 1/3 = ?

For FIFTY problems. That’s it! Then, the next day, it would be another fifty problems like this:

5/6 – 1/4 = ?

Okay, you need to learn to add and subtract fractions, but is that ALL you need to learn? Obviously not. How boring must it be to sit and just calculate answers to the same type of problem over and over? This stuff made me start to hate math and I LOVE math.

How can you possibly think that is teaching kids math? That’s like making them copy down all of the words in the dictionary and pretending you taught them literature.

Don’t even get me started on teaching statistics – wait, too late. I’m started. That is my rant for tomorrow.

### Jul

#### 26

# Let them code games about cake

Filed Under Algebra, computer games, Dr. De Mars General Life Ramblings | 4 Comments

I’ve spent a good bit of my life living and working in places that many of my colleagues would not drive through in the middle of the day with the windows rolled up and the car doors locked, so you’ll have to excuse me if I am a bit cynical about the latest push to teach everyone to code.

I’m not opposed to coding, in fact, I am greatly in favor of it. It is tied with drinking Chardonnay for favorite activity for which you do not have to get naked. I was an industrial engineer in 1982 – so I was into STEM before STEM was even a thing.

What makes me roll my eyes and sigh is where many well-meaning people have completely missed the mark when they say that you don’t really need to know much math to write software. Clearly, they can’t mean all kinds of software because obviously if you write software to do statistical analysis, predictive analytics or whatever the phrase du jour is, you very much need math.

Often, these people are talking about games –

“Kids play games, let’s have them make them.”

That doesn’t necessarily follow any more than,

“I have a liver. I should create a dialysis machine.”

Ignoring the faulty logic for a minute, let me point out that most games DO require math. The people saying they don’t are usually people who are quite successful, both professionally and academically and have spent their entire lives around people much like them. What they mean when they say that, “Games don’t require much math” is

“I took three semesters of Calculus and a course in multivariate statistics and I rarely use any of that in making games.”

I, on the other hand, meet many people who can’t multiply two-digit numbers without a calculator and have never given a thought to the concepts of randomization, ceiling, floor or rounding. The vast majority of these people are perfectly intelligent enough to learn those things if ever given the motivation, time and instruction.

Here are a few lines from a super-simple game, “Canoe World”, I wrote in the past two days. It’s a very common application. You can find it in the Game Design book by Rex van der Spuy and hundreds of other places. You randomly decide who is stronger, the player or “enemy”, one wins the exchange and points change – a pretty standard game component.

function sink(thing) {

// The player’s strength ;

var playerStrength = Math.ceil((food+ health)/2) ;

var rockStrength = Math.ceil(Math.random()* playerStrength*2) ;

// Find out if the player strength is greater than the rock strength ;

if (rockStrength > playerStrength){

// The rock sinks the canoe ;

var lostFish = Math.round(rockStrength/2) ;

food -= lostFish ;

// Player gains experience ;

experience += 1 ;

To compute the player’s strength, I take the average of their food and health points, and round that up. That’s the ceiling function. To understand this, you must have some idea of order of operations – things in parentheses get done first – to understand that first I’m adding the two values and then dividing by 2.

You need to know that having that slash and then a number means to divide by a number.

**That is math and not everyone knows it.**

A ceiling function rounds up – and to understand that, you need to understand the concept of rounding.

To understand the second statement, you need to know what a random number is, that the * means to multiply. You also need to know that the random function generates a random number between 0 and 1 and realize that is a continuous distribution because there are an infinite number of numbers between 0 and 1.

**That is math and not everyone knows that.**

You’d have to realize that since the random number function is between 0 and 1, if you just multiply that number by the player strength it is ALWAYS going to be less or equal and the “enemy” will never win. Since, on the average, the random number will be .5, if you multiply by 2, that makes it equally likely the player or enemy will win and gives you a game of chance.

To change the probability of the player winning the exchange, you can make that number larger or smaller.

You need to know that the > means that the thing on the left is greater than the thing on the right.

**All of that is math and not everyone knows it.**

The people who want to teach kids to code assume that either,

a. Everyone knows this much math – in which case they are OH, SO WRONG! or …

b. That they will work with the minority of students who do.

There is absolutely nothing wrong with option B. I wish you the best of luck with all my heart and will do whatever I can to help.

Most of what I can do to help is make games to teach math, so that more kids will fit with option B.

There is an option C, which intrigues me, and I have heard very few people discuss, which is to teach the math along with coding. That is certainly not impossible – but it would be hard – you would need students very motivated to put in the time and effort and teachers who were able to step back and start at whatever level of math competency required by an individual student.

This whole thing reminds me yet again of the comment made by Dr. Irv Balow, Dean of the UC Riverside School of Education. Frustrated by reading so much research that said under some conditions class size had an effect, under other conditions, not so much, for some students cooperative learning was a benefit, for others it was detrimental, etc. etc. etc. , a student asked,

“Isn’t there anything in education or psychology we know as absolute, unqualified fact?”

After some reflection, Dr. Balow replied, that the only thing he could be absolutely sure of was this :

“All of the simple answers are wrong.”

### Oct

#### 21

# Wonder why girls don’t like math? Look at yourself!

Filed Under Algebra, Dr. De Mars General Life Ramblings | 5 Comments

Having taught math myself for the past 30 years, and with a brother who is a middle school math teacher, I am obviously not tarring all math teachers with the same brush, but I am really starting to get pissed off here. I have beautiful daughters, and it is not just me who says so. Here is the oldest one.

Here are the other three.

See the middle one there? When she walked in for the first day of an advanced math class, the TEACHER (who was a woman), asked her,

“Are you sure you’re in the right class?”

Ronda came home and told me about it. She said,

Well, I guess I don’t really look like I belong in there. I’m the only non-Asian girl in the class, and I’m tall and blonde. I really stand out.

Ronda is extremely good at math. When she was young, we assumed she would get her Ph.D. in some kind of science, but she decided to go the UFC / movies route instead.

The other three could have been extremely good at math, but it was not a particular interest of theirs. The littlest one, on the left, has done quite well in math, until very recently.

What has happened with all of my daughters, though, is that the schools and I have generally butted heads with what we expected of them. When my oldest daughter met with the high school guidance counselor, and was asked what schools she was interested in, Maria said,

“I’d like to go to either Harvard or NYU.”

The counselor *laughed* and said,

Of course, everyone would like to go to Harvard or NYU but let’s take a look at the local community college.

I called the counselor up the next day and asked if she was fucking kidding me. I told her that her daughter could go to the community college, but if my daughter wanted to go to NYU or Harvard that is god damn well where she was going to go. Maria did graduate from NYU, in 3 1/2 years, thank you very much, when she was 20 years old.

Of my three older children, one has a bachelors from NYU, one has a masters from USC and one is finishing filming Expendables 3 this week and then flying off to film Fast and Furious 7. They are a fairly accomplished group.

And yet … more often than not, I was pushing them academically more than their teachers were – and you can’t find a much more yuppie school district than Santa Monica-Malibu, and most of the time they all went to private schools. As a general rule, if they fell behind (which in my mind is anything less than an A because, seriously, what do they have to do but study? It’s not like they’re working in a coal mine after school or cleaning their rooms or anything.) – I was much more upset about it than their teachers were. They did not EXPECT my children to make straight A’s, take AP Calculus, get into top schools.

When Maria walked into Geometry in the ninth grade, one of the girls she had run cross-country with the year before, who was a junior in the same class, exclaimed in shock,

“You’re smart?!”

Yes, one of my daughters was a cheerleader. Two were very much into sports in high school. Two were very much into going to the mall and buying every item of designer clothing sold in America.

If you are a math teacher, honestly, ask yourself do you have the same expectations for every student in your class? Really?

I asked myself that same question several years ago. I teach graduate-level statistics and I used to encourage the students “who I thought would be interested” to present their research at conferences, to publish it. I quit doing that. Now, I make those announcements in class, repeatedly, and encourage everyone.

Year after year, students have surprised me by the level of motivation and the quality of their work.

Honestly, if you teach AP Calculus and you have a pretty blonde girl that comes to your class some days in a cheerleader outfit (because that’s what they wear on game days), and is making a B or C, do you assume that is the best she wants to or can do? Honestly? Just between you and me?

One of The Spoiled One’s favorite movies is Legally Blonde. You know why? Because everyone assumes the protagonist is dumb because she’s interested in fashion, pretty and naive. In the end, she is dissuaded from dropping out by a professor who tells her that she *can * do it, and the movie ends with her graduation from Harvard Law School.

If you’re a math teacher, I’d like you to watch that movie, because my kids DO live in southern California and they DO shop in Beverly Hills and contrary to what you think about how they look, they DO belong in your class.

### Sep

#### 25

# Don’t Believe Other People are Smarter Than You + Github is awesome

Filed Under Algebra, Dr. De Mars General Life Ramblings, Software | 3 Comments

If you want to be a programmer, entrepreneur or a statistician, the best advice that I can give is,

“Don’t believe other people are smarter than you.”

Sometimes that is hard advice to take. I read an interesting blog post by Ali Berlinksi, “I miss being stereotyped”, about being Asian-American and moving to an area in Spain where people had met so few Asians that they had no stereotypes. She said she missed the advantage of having people just assume she was studious, intelligent and good at math.

Of course, as she notes, most stereotypes are not nearly so benign. Many groups – Native Americans, women, Hispanics – are assumed not to be as good in math, or programming or really not the start-up type. Not many people say it that bluntly any more.

Last week, I happened to be in a seventh-grade math class at a predominantly Hispanic school, I asked,

“How many of you would like to be a programmer or design computer games?”

One girl’s hand shot up while the rest of the students looked at me (and her), as if it was a crazy question. I persisted,

“Why not? Seriously, why not? “

This wasn’t a remedial class. The math the class was doing when I walked in was closer to eighth-grade level than seventh, and remember, the school year just started. It’s often more a lack of encouragement rather than being actively discouraged.

My friend, Hayward Nishioka, is a phenomenal judo instructor and competitor, author of several books. We were having lunch this week and he said to me,

“You know, you need to give young people

permission. You say to the student, you know, YOU could earn your black belt, YOU could become an instructor, too. You have that ability. Then they go ahead and do it, because you have given them that permission.”

I’m not sure that is true of everyone. Some people telling them they can’t it just makes them more determined. But, he is correct about a lot of people. He’s also correct that it is harder to keep going when you don’t have a lot of confidence you will succeed.

Programming is one of those things that takes a lot of perseverance – why do you think they call it hacking? It’s easy to get discouraged when your first attempt doesn’t run – and believe me, once you get out of CS 101 and get into real problems, your first attempt almost NEVER runs. Sometimes your second, third and eleventh don’t either. It happens to everyone. It’s normal.

What I’m afraid I see in too many classrooms, though, is that students have not been encouraged to believe they will succeed in the end or that that math and programming are things they should expect to be able to figure out. So, when they have that fifth failure, they just assume they aren’t smart enough.

Here’s another piece of good advice. Check out github.com – a place where you can find a generous number of code examples (and I feel terrible guilt that I have not contributed – although it is written on my whiteboard as one of the ‘must get around to’ items). When you are first learning a language, it’s great to see finished examples of ‘the big picture’. Reading books on a language is great, but no substitute for actual working on a project. For me, starting with something like programming a tip calculator is as boring as watching paint dry. I’d rather jump in there and do something like a game. With github, you can read through examples and see where what you are learning is being applied.

Not everything on github runs or works as desired. People put up projects for review, projects that are in progress. As you gain more experience, you might want to download a project that is similar to what you want to do and just modify it. You’ll certainly see code that you would have written differently. You’ll see code where it is obvious that the person who put it up actually just downloaded it from somewhere and modified it, because there are modules, functions, that don’t really do anything — they’re left over from whatever the original program was. That’s your first insight into no, not everyone is smarter than you.

The nice thing about github is you can kind of lurk anonymously and look over other people’s shoulders and see that no one else is perfect either.

As you gain even more experience, you’ll eventually start downloading code that you think, “Hey, I could do this part better. …”

Someone told me, no one has math anxiety, they have dumb anxiety – they are afraid that other people will think they’re dumb. This is another thing that github may help you with. I’ve never once looked at anything, and thought, “That person is really dumb.” More likely, I’d think, they must be new to programming.

On occasion, I’ve downloaded a program from someone who had a reputation as being really smart, and found ways to improve it, for my purposes anyway. Did I think, “Wow, I must be smarter than that person”?

Not even once. What I actually think is, “This saved me a couple of days work and I really feel good that I can improve on something someone this smart wrote.”

So, my two points, before I toddle off to bed with a glass of Chardonnay:

1. Math, statistics, programming – you can learn it. Just start and keep going.

2. Github is awesome.

### Dec

#### 5

# Math sites in the “Dude! You have to check this out!” category

Filed Under Algebra, statistics | 2 Comments

Let’s face it, 90% of everything on the Internet is crap.

This is especially true when it comes to educational resources.

So I cannot believe I did not come across these until now. Maybe they were just lost in the swamp of effluvia. I came across so many good resources lately that I am planning on re-designing my course next spring to include a lot more applets, videos and other cool online options.

**Here are some sites in the “Dude! You have to check this out!” category**

Against all odds – statistics videos created in 1989! These are 26 half-hour videos on different topics on statistics. Think Nova for statistics.

Yummy Math – a website of activities making mathematics relevant to the real world. That’s their tag line. I’d say they make mathematics INTERESTING, like figuring out your savings buying Christmas presents, or comparing the durability of twinkies and tomatoes through time lapse photography or computing how much coffee could fit in a giant coffee cup. Go there. See for yourself.

SAS Curriculum Pathways – an enormous free site that has an unbelievable amount of stuff on statistics, algebra, geometry – oh, yeah, and I guess English, Spanish and Social Studies, too (if you care about that stuff). I have no excuse not to have looked at this before because I have been hearing about it for years and the nice people from SAS sent me links which I never clicked on but just sent to friends of mine teaching middle school and high school. Hey, I’m busy. That’s no excuse. The school where I volunteer has a shortage of textbooks. Well, this site has pages to read, then research questions, then statistical applets.

Not strictly set up as an educational site, but Policy by the Numbers blog is like my twitter stream but far more in-depth. Posts on open data, Google hang-out on AP statistics. It was educational for me. Made me want to teach high school AP statistics. Just listening to this one video gave me two new books I want to read as possible textbooks for my class, so it’s educational for me.

The mathalicious blog is really cool. Their site also seems to have some good activities based on the sample ones but I’m not sure because they want $185 a year for a license, which strikes me as a bit steep.

Last but definitely not least is CAUSEweb.org – which I had actually seen before but I guess I was busy (detecting a pattern here?) This is the Consortium for the Advancement of Undergraduate Statistics Education. The first thing I saw here was a free workshop in San Diego on playing games to teach statistics, funded by a National Science Foundation grant. I signed up for it on the spot.

It’s been a very productive week for finding sites and other resources I want to review for teaching statistics. So much so that I used this other site, 43things.com to make a list of all of the stuff that I want to consider for the grand-a-mundo course re-design.

Please, please, please if you have suggestions, chime in.

### Nov

#### 17

Here is a math problem:

Hoksinato and Tasunka Ska are going to steal horses. They could steal the scrub ponies from the edge of the camp. The last 15 times warriors from the tribe tried to steal scrub ponies, they got away 12 times and were caught and tortured 3 times. If they steal the war ponies instead, they will show more bravery, maybe even earn an eagle feather. Plus, war ponies are much more valuable. The last 10 times warriors from the tribe tried to steal war ponies they got away 3 times and were caught and killed 7 times. What is the probability that they will steal the war ponies and get away?

The correct answer is 30%, in other words, 3 out of 10 times.

Another way you could possibly answer it is 12%. You *could* interpret it as there were 25 attempts at stealing ponies, and that the question was,

*What is the probability that they will steal the war ponies AND get away?*

In that case, the probability is 40% that they will steal the war ponies (versus the scrub ponies) and 30% that they will get away, .40 *.30 = .12

Thinking about this, I decide to re-word the question. To say,

Hoksinato is not sure whether or not they should try to steal the war ponies. What is the probability that warriors stealing war ponies will get away?

A statistician would immediately think of this in terms of P(A|B) in other words, what is the probability of escape given that they are stealing war ponies? The answer is clearly 30%.

Here is why solving this problem is hard

- It is not worded to be completely clear whether I need to know the probability of getting away when stealing war ponies or the probability of getting away AND stealing war ponies.
- I need to decide which numbers are relevant. For this particular problem, the probability of escaping when stealing scrub ponies is irrelevant.
- I need to decide on the correct operation, in this case, to find the percentage of successful war pony theft attempts, which I find by dividing ten into three.
- Finally, I need to know the answer to 3/10

Why don’t I just ask, “What is the probability of escaping, if a warrior escapes 3 times out of 10?” Because that is a much easier problem. Here’s the kick in the ass – problems in real life don’t come up that way. They occur ambiguously worded with extraneous information thrown in.

Many people, including most of those awarding funding at the National Science Foundation, realize this and thus very strongly urge mathematics programs to teach problem-solving via discovery learning, guided discovery or other methods. These people are right – to an extent. As you can see above, basic mathematics alone won’t solve this problem.

Many other people, including many math teachers at low-performing schools, believe the NSF is run by COMPLETE IDIOTS because the students don’t know the concept of probability, much less P(A|B) , they have no idea of the notation, where to even begin deciding which are the relevant numbers and oh, yes, they can’t divide 10 into 3 and come up with .30 either. These people are also right – to an extent.

If we are going to teach kids math effectively, we need to fund projects that bring these two sides together.

Y’all get on it.

### Mar

#### 2

# Becoming an Expert Statistician (or Mathematician or Programmer)

Filed Under Algebra, Dr. De Mars General Life Ramblings, statistics | 6 Comments

It’s not often that you read a paragraph and it sticks in your mind for months. That this particular paragraph came not from some great literary work but rather from the proceedings of the annual meeting of the Association of Small Computer Users in Education is even more expected, but there it is. Douglas Kranch wrote:

“Expertise develops in three stages. In the first stage, novices focus on the superficial and knowledge is poorly organized. During the end of the second stage, students mimic the instructor’s mastery of the domain. In the final stage, true experts make the domain their own by reworking their knowledge to meet the personal demands that the domain makes of them.”

This idea kept coming back to me in a lot of ways. I have a thirteen-year-old daughter who is now learning the basics of chemistry, algebra and physics. I teach students statistics, and often have them use SAS for data analysis. I’m in the middle of using javascript for a much larger scale application than I have created with it in the past.

I get irritated by the frequent use of the phrase “STEM education” for science, technology, engineering and mathematics, as if there is no difference among organic chemistry, javascript and calculus, but in this case I really did see a common thread.

Existing mathematics (and statistics and science) education programs are too limited. They either focus ONLY on drill and practice, not progressing past the first stage, or they try to skip the first stage or two entirely, an overreaction that while having the laudable goal of teaching “higher order thinking skills” often leaves students frustrated and discouraged as they do not have the basis for the tasks required. Part of the problem comes from, I think, having subjects taught by people who were not experts themselves.

Let me give two examples, one horrid and one good.

It’s common for middle school teachers to give students assignments that are supposed to be “relevant”, for example, “Make up your own periodic table”. They did not, however, come up with a new way of arranging elements. No, they did a periodic table of football players or TV shows. I suggested to The Spoiled One that perhaps she could do Disney channel shows and have those that had a character move from one show to another be in one group, just like elements that lose an electron are in one group. Similarly, those shows that shared a character, like if Miley Cyrus also did appearances on The Suite Life could be a different group, like those elements that shared an electron. I was out of town at the time – (if you follow this blog, you know that my children contend most stories of their childhood begin this way) – but when the project was due, the world’s most spoiled thirteen-year-old turned in something she drew with a pencil on a piece of paper and got a 50% on it. When I quizzed the rocket scientist about how this happened he answered unrepentantly,

“I didn’t make her put any effort into it because she said it was stupid and I agreed.”

While I did not have this precise conversation with the school – Seriously… What. The. Fuck – you want a kid to learn about the periodic table, covalent and ionic bonding – you teach them that, NOT relate it to stupid TV shows we’d just as soon she not watch any way. We spent many hours going over with her the idea of electron shells, what happens when a shell is not full, the number of electrons in each shell. You want a kid to know that NaCl is sodium chloride? You explain that Na is the symbol for sodium and Cl is the symbol for chlorine and you put the two together and you get sodium chloride. There’s actually some really interesting stuff you can throw in there about how it’s kind of weird that when you combine these two elements you get something that really isn’t very similar to either one individually. You want to get kids interested in chemistry? Do experiments. Few things are more motivating to the average eighth-grader than the possibility (however slim) that they might get to see the school blow up with the teachers in it.

I’ve been a teacher. I started out, like most people, as a not particularly good teacher, and then, with years of experience, I got better. I recognized that all of that stuff, like the periodic table the electron shells, multiplication tables, how to read an ANOVA table, you need to learn that. Even if you don’t get it at first, if you ” … focus on the superficial and your knowledge is poorly organized” – you still learn that p-values, df, sums of squares should be in there. At first, you don’t know what df stands for and when you find it is degrees of freedom that doesn’t really tell you much. After a while, you vaguely start to get it. It’s frustrating, it really is, going through those motions you don’t really understand – but there isn’t any alternative.

Let me go on to a different example. I wanted to use javascript to write an extremely complex application. So I needed to learn javascript better. I read a couple of books. I did a bunch of codecademy exercises, watched some videos. I wrote small programs that did bits and pieces of what I wanted. Then, I took someone else’s program that was pretty complicated. Not thousands of lines of code but hundreds. I went through and typed in their whole program line by line trying to figure out what each part did as I copied it. After I got it to run, I made some changes just for my own amusement. Then I did the same with a few other programs.

After a while, I could see where those “master programmers” had made mistakes. I’d notice they’d left a semi-colon off the end of a statement, left out the period, typing Mathrandom instead of Math.random or used a semi-colon when calling a function instead of a comma. In short, I got better at understanding the superficial – how the syntax has to look. At the same time, though, I started to see how the logic worked. To see how one could use a loop inside a function to draw a deck of cards, for example. In the end, I had a game that worked. Then I changed it to be a different game, more like what I had in mind. I’m not as expert as I’d like to be in javascript yet, but I’m getting there.

Yes, in this process, I drew a lot of connections to other programs I had written in other languages. What I did not do is draw a parallel with the time we got lost and went driving around Miami trying to find somewhere it was legal to make a u-turn. (Let me just say that Florida has commitment issues. If you are going south they think you should just keep going and if you change your mind and want to go north, forget it.)

What I also did not do is one mindless fill-in-the blank or multiple-choice exercise after another ad infinitum. I didn’t memorize rules until I could pass some arbitrary test at 100% accuracy. Although I did start with that, I didn’t finish with it. In fact, I did the very minimal amount until I could move on to the imitating experts and making it my own.

If you want to learn programming, statistics, chemistry then DO that. Don’t just read about how to do it and for the love of God, don’t do something else, like stupid charts of TV shows or biographies of women mathematicians and pretend you’re doing STEM education.

### Dec

#### 29

# Advice for Daughters on Succeeding in the Tech World

Filed Under Algebra, Dr. De Mars General Life Ramblings | 1 Comment

The third of my four daughters was being questioned about her training before the last Olympics, and answered;

My mother was the first American to win the world championships, so I called her for advice, and believe me, Mom is always

brimmingwith advice, whether you want it or not …

In fact, all parents have the experience that their own children occasionally take advice from strangers far better than from them. So, for your daughters or mine, here are three pieces of advice on succeeding in the tech world.

**1. Learn Calculus** – Ignore every person who tells you that you won’t need it, it’s too hard. Take it in high school and take it again in college. People often say, “I just can’t do math.” That’s bull shit. You just can’t make the NBA. You can certainly do math. My youngest daughter whines that way sometimes and yet she doesn’t sit and read her Algebra book unless we stand over her and make her do it. Here is why you need to learn calculus:

- 99% of all math books are written to be so boring that you want to track down the authors and bitch slap them. Learning calculus is good training for life because there WILL be boring things you have to do to get to where you want to be. By ten years old, you should have overcome the idea that everything has to be as intrinsically rewarding as laying on the couch with your puppy.
- If you do happen to have a hard time, even better. Don’t skip class. Read the textbook. Get a tutor. Read the book again. Everyone at some point runs into concepts that are difficult. This happened to me twice, in calculus and in my fifth semester of statistics in my doctoral program. Now, in both areas, it is hard for me to understand why it was ever confusing, but I remember at the time reading the book over two or three times and still being a little fuzzy and afraid I wouldn’t ever get it. I’m married to a real-life rocket scientist, a man who decided to pursue a Ph.D. in particle physics because “nuclear physics was too easy” and even he had a point in school when he ran into concepts he had to read over and over until he understood it. Find a way through. That’s a super-important lesson in life.
- If you learn calculus, you WILL use it. I took Calculus I & II my freshman year of college. It came up in a few economics courses my senior year and in my first statistics course, which I took in the math department. I never had any use for calculus for years after I graduated. Then I went on for a Ph.D. and specialized in Applied Statistics. Calculus was really useful in some of those courses. Now, in my profession, whether reading research, reading documentation or programming, it comes up fairly often. Not every day, but certainly every month.

**2. Learn to say “Fuck you” and say it both openly (rarely) and to yourself (often).**

My friend has a reputation for a great bedside manner. He uses a code phrase. When a patient says something like:

“I have decided to treat my cancer with grapefruit juice instead of chemotherapy.”

He responds,

“I understand how you can see it that way.”

This is his code for,

“You’re a fucking moron.”

You need a code phrase because people will try to dissuade you, denigrate you and generally provide useless advice (contrary to the wonderful advice I am giving you now). They will tell you that you cannot be an entrepreneur because you want to have a family. They’ll tell you that you are not a real ‘techie’ because you don’t have a degree in engineering. If you do have a degree in engineering it will be because you don’t have a degree in Computer Science. If you do have both degrees and have experience as an engineer and programmer it will be because you don’t know a specific programming language. Some people seem to have a sadistic desire to pull other people down, saying things like,

“You may have a masters degree but it’s not computer science from MIT. You don’t program in Ruby or Java and everyone knows that unless you have years of experience in both of those you are not really marketable.”

Feel free to tell those people, either:

“I understand how you can see it that way, but I’m going to go ahead and apply for the position at the accelerator anyway.”

or

“Fuck you! I’m going to do it anyway and I don’t care what you think.”

Seriously, there are very few insurmountable obstacles. One of my daughters received a Fulbright scholarship to study in Germany for a few weeks. She almost didn’t apply because she had a young child. I told her that she was being ridiculous, she had a husband, a mother, a mother-in-law and two adult sisters. Between the lot of us, we could take care of one baby.

So what if I let her teethe with Twizzlers during the week I was there?

I also took her swimming in the hotel pool every day, to the science museum, to the aquarium and taught her to dance in elevators. And when Maria came back from Germany, her daughter was still alive, better than ever, because, hey, she had a couple more teeth.

This is really the most important piece of advice I have. Don’t let anyone discourage you and that includes yourself.

**3. Learn a programming language or two.**

If you followed my first two pieces of advice, this third one will be easier. The whole trick to learning a language is to not get discouraged and plug away at it. Read a book. Write some code. Read another book. Look at programs other people wrote. Think of some things you want to do with that language. Try them. Fail. Swear. Try again. Don’t get discouraged.

Douglas Kranch gave a good description of how expertise develops,

” Expertise develops in three stages. In the first stage, novices focus on the superficial and knowledge is poorly organized. During the end of the second stage, students mimic the instructor’s mastery of the domain. In the final stage, true experts make the domain their own by reworking their knowledge to meet the personal demands that the domain makes of them. “

This is why those first two bits of advice matter. In learning programming it is easy to get bored or discouraged as you go through those first two stages. It’s easy to start believing it’s too hard, that guy who told you women don’t have the same natural talent for programming was right, it’s too late for you to start now because you didn’t take enough math in college …

“I understand how you can see it that way.”