LaTeX in Anki

So I have LaTeX working in Anki:

Front of Card:

Let X be the number of tosses requires until the first 5 appears on a die.
\displaystyle E(\frac{1}{2^X})?
Back of Card:
\displaystyle \frac{1}{7} =\frac{1}{6(2)-5}
Geometric distribution
\displaystyle \sum_{i=1}^{\infty} \left(\frac{1}{n}\right)^i\left(\frac{1}{6}\right)\left(\frac{5}{6}\right)^{i-1} =\left(\frac{1}{6}\right)\left(\frac{1}{n}\right)\sum_{i=0}^{\infty}\left(\frac{5}{6n}\right)^i
\displaystyle=\left(\frac{1}{6n-1}\right)

I know that is a little wordy for a flash card, but sometimes I like to put a little background information on the back of a card, so I can remember how the fact is derived.  And, yes, I know that I have been carrying on about SuperMemo.  Too bad 🙂

When Things Get Tough

I’ve been through this before.  Times when I look at the page, and things that I thought I learned earlier don’t make any sense now.  Times when every little distraction puts takes my mind away from where I want it to be.  Times when I question whether I will ever learn this stuff.

What is a person to do in these circumstances?  Here is my list, which I will add to:

  • Back up.  Work on easier, more foundational skills.
  • Start and complete a creative project involving the current material.  For math this might be something like a cheat sheet, or some simple sample problems.
  • Find other sources of information.  Collect all of the books available that touch on the given topic, and perhaps one of them will resonate.
  • Drop the current topic, and come back to it later.
  • Get organized.  Attack the subject in the very most thorough and efficient possible manner.

Already, writing my list has helped me.  I have way too many piles on my desk right now.  I am putting away everything on my desk that is tangential to this topic, and laying out all of my good sources.  Then, I will make a document here that summarizes my work.  Here goes. 🙂

{one hour passes}

It is an hour later, and I have already feel better about my progress.  I started off by putting some General Tso’s Chicken in the microwave.  Then, I came back and cleared my desk off.  I still had a pile from where I wrote bills out this morning.  Just clearing that off made me feel a whole lot better.

After eating, I dug through books to find some good material on transformations of random variables.  In one old Dover book I found half of what I needed: some simplified explanations that I had never seen before.  In another book, I found the rest of what I needed, a rigorous theorem-proof coverage of the “rules” glossed over in other texts.

So, I am going to spend a few hours with my friends Casella and Berger (Statistical Inference, 1990, Wadsworth).   Later, I will share my results.

My current Probability items for Anki

I thought that I would post my current memorization list for exam P/1 in both Mnemosyne and Anki form, but I am having trouble with the xml files that Mnemosyne is creating.  So what I have here is just in Anki form.   I don’t believe that there are any mathematical errors, however there may be some small formatting errors in the Anki file due to the conversion.  There are currently 489 items in the deck.

Anki Deck for Exam P/1

It would be great if you could let me know what you think.  I will repost perfected versions of these every couple of months.

By the way, I just realized that there are 6 cards in the deck with images that did not get transferred.  A few cosine questions, and a couple with even and odd functions.  Just ignore them for now.

Am I graduating to SuperMemo?

So, I am finally biting the bullet and using SuperMemo.  I really like being able to chart my progress.  And it appears that I can just copy formulas written in LaTeX and paste them right into the program.  I think somehow that SuperMemo uses internet explorer for this.

But it is the extra creative possibilities that sold me on SuperMemo, in the end.  What finally convinced me was the collection posted on this blog:  SuperMemo Adventures.  There is a deck for download that uses a few of the great visual formatting possibilities that are not possible with the other software out there.  I am gradually going to transfer my material over.

Upon reflection, I suppose the thing that always draws me back to SuperMemo is all the stuff about spaced repetition on the SuperMemo website.  This information was my introduction to spaced repetition several years ago.  When I read it, I get the feeling that it was written by someone who really believes in what they are writing.  This aspect brings me back time and time again.

Adding Some Mathematical Content to My Pile.

So, I was up early doing some random problems, and I ran onto this one:

Given f(x) = 1/9 (3 |x| ) for |x| < 3, what is Var(X)?

I have seen this problem before.  There are a few easy to avoid pitfalls.

We need to find Var(X) = E(X2) – E(X)2.

First, we notice that this is an even function.  The expected value of an even function is 0.  Since f(x) is even, xf(x) is odd.  The integral of an odd function from -L to L is 0.  This is a very simple fact which, if missed, will lead you into a mess of integration.

Next, we notice that E(X2) is an even function, because x2f(x) will still be even.  The integral from -L to L of an even function is simply 2 times the integral from 0 to L of the function.  This integral is super easy to calculate.
\displaystyle Var(X) = \frac {2}{9} \int_0^3 x^2(3-x)dx = \frac{3}{2}
Next, since this problem involves some traps, and some non-trivial calculus facts, I decide to explore the problem further and to enter the facts into my spaced repetition software.  First, I start with some general questions:

The expected value of an even function is ???

  • 0
  • Since f(x) is even, xf(x) is odd. The integral of an odd function from -A to A is 0.

When f(x) is even, E(X) is ???

  • 0
  • Since f(x) is even, xf(x) is odd. The integral of an odd function from -L to L is 0.

When f(x) is even, E(X2) is 2 times ???

  • ∫ from 0 to L x2f(x) dx
  • because when f(x) is even x2f(x) is also even

The variance of an even function is E(???)

  • E(X2)
  • because xf(x) is an odd function, hence E(X) = 0
  • E(X2) – 02 = E(X2)

Given f(x) = 1/L2(L− |x| ) for |x| < L, what is E(X)?

  • 0
  • Since f(x) is even, xf(x) is odd. The integral of an odd function from -L to L is 0.

Now, since my goal is to become a whiz, you will see above that I have started to find a general solution to a specific problem.  Mathematics is all about that.  So, my next batch of problems are both more general, and more specific.

Given f(x) = 1/L2(L− |x| ) for |x| < L, what is E(X2)?

  • L2/ 6
  • This is also Var(X), because the variance of an even function is E(X2)

Given f(x) = 1/L2(L− |x| ) for |x| < L, what is Var(X)?

  • L2/ 6
  • This is also E(X2), because the variance of an even function is E(X2)

Given f(x) = 1/4(2− |x| ) for |x| < 2, what is Var(X)?

  • 2/3
  • Variance of f(x) = 1/L2(L− |x| ) for |x| < L = L2/ 6

Given f(x) = 1/9 (3− |x| ) for |x| < 3, what is Var(X)?

  • 3/2
  • Variance of f(x) = 1/L2(L− |x| ) for |x| < L = L2/ 6

Given f(x) = 1/16 (4− |x| ) for |x| < 4, what is Var(X)?

  • 8/3
  • Variance of f(x) = 1/L2(L− |x| ) for |x| < L = L2/ 6

I often like to throw in a few numeric examples, so that I learn to recognize my generalization when I run into it.  So, I have taken a problem and turned it into a dozen memorization items.

Really Struggling (In a Good Way)

I am really struggling in a good way right now.  I am taking a week or so to work a few hours a day on joint conditional probability problems.  These can be real stumpers.  First, the areas and limits of integration involve some work.  Diagrams are a must.  Then, it takes several layers of reasoning get from what is given to the desired outcome.  On average, I take in between a half hour and an hour with each problem.  Then, the problem goes on my “solved easy list” or “solved tough” list.  Each day, I try to work with new problems, plus solved ones.

At this point, I am just working with problems from the SOA/CAS samples.  These are problems 109 through 125, 131, 136, 138, 144, 145.  This is not an exhaustive list, and may include some unrelated problems.  Still, my reasoning at this point is that these problems are the best place to start.

For instance, I can’t believe that this one still tricks me: We are given that f(x, y) = 2e-(x+2y), for x>0, y>0, and asked to find the variance of Y given that X>3, Y>3.  After forty minutes, I look at the answer key, and find that X and Y are independent.  Hopefully I have learned my lesson, and that is the last time that fools me.

Reading Glasses

So, I am up to page 262 in Guo.  I have to slow down a little now, and spend a week or so working joint marginal and conditional density problems.  First, these problems are difficult to set up correctly.  Then, they usually involve a big, icky integration.  So, I am going to spend at least another week working specifically on this type of problem.

At one time, I had printed out all of the old SOA/CAS exams and put them in big binders.  Nice, but hard to lug around when I wanted to get out of the house and study.  Recently, I noticed that there is a pdf file available with 153 questions and solutions.  This is updated from another smaller file of questions and solutions.  Here are the links:
questions
solutions

I have realized that virtually everything from the old sample exams has been extracted and put into these documents.  So, I printed out a couple of nice little booklets that I can take anywhere with me:

Test P/1 Booklets

Nice Little Problems

I would also like to index the problems.  If I do, I will post the index here.

And , oh, the big news is that I acquired my first pair of reading glasses yesterday.  This is a bigger milestone than it might seem.  In the last year, I have realized that I have a little trouble seeing when I lay down to read a few pages before I go to sleep each night.  Almost every night of my life, I have read a few pages.  But here is how it was going recently.  I would lay lie down and open a book.  In a minute or so I would get frustrated that I couldn’t see, and turn the light out.  Then, I would think, “Gee, I would get to sleep a lot easier if I could read a few pages of Dedekind, or Hilbert.”  (these are books that always make me happy) So, I would turn the light on, start reading, and suddenly realize that I CAN’T SEE.  So, I would turn the light off again, and start thinking about reading.

Now, I have reading glasses.  They were a dollar, at the dollar store.  I am very happy.

A Few Productive Days

I have had a few productive days, both in my studies, and in my life in general.

I am up to page 250 in Guo.  I read through the sections on the Beta, Weibull, Pareto, Lognormal, and Chi-square distributions, and did some problems, but did not put any particular effort into them.  When I am finished with the rest of the book, I will return and make a more thorough study.

What I did put effort into is the section on joint density and double integrations.  I have been doing these kinds of problems for a long time, and have been thrown off by more than a few of them, but have never really put any thought into a standard technique for solving them.

I could have just cracked a calculus book to find the same information.  First, I check my copy of Apostal (1961), but I only have volume I.  So then, I check Stewart (1999) and Larson (1990), which do have equivalent information.  Even easier, I could have spent a little more time with The Actex P/1 Study Manual (Boverman, 2010) which does have very specific ideas for settings up double integrations.

The important thing is to draw good diagrams.  It is easy to become complacent with the idea of solving mathematics problems completely symbolically.  A graph may not prove anything, but it can sure get you on the right track.

So, I am up to 466 memorization items.  One thing that I am memorizing is some nameless distributions that appear in old tests. One example is the distribution:

f(x) = 2x / L2, 0 < x < L

I have noticed that this distribution appears on many old problems.  If you check, it integrates to 1, so it is a pdf.  Well, it is easy to find formulas for E(X) and Var(X), and memorize them you would for any other named distribution.  Then, one does not need to perform time-consuming integrations at test time.

Status

Okay, so I’m finally up to page 183 in Guo.  He has a few chapters on some distributions that no longer appear on the test p syllabus.  I am going ahead and working through them anyways, partly because it will give me some entirely new material for a change.  In the meanwhile I am returning to doing an hour or two each day of random problems from old SOA tests, plus continuing with memorization.  Whenever I run into calculus I have forgotten, I take a little time to crack open a couple of calculus books to review the topic.  If I find good stuff that I want to remember, I load it into my spaced repetition software.

In the meanwhile, I have been experimenting on formating things in this post using LaTeX. I have never used LaTeX much, but the basic syntax seems pretty simple.  When I was writing math papers, I found that open office gave me a similar functionality.  In other words, one may just type in “integral from 0 to infinity e^(-y)y^(a-1)dy and it would end up looking like:
\int_0^\infty e^{-y}y^{\alpha-1}dy

Wow, I did it!  My very first LaTeX equation!  (It doesn’t take too much to make me very happy).  In case you are wondering, that is the Gamma Function, \Gamma(\alpha).

What I actually typed in was \int_0^\infty e^{-y}y^{\alpha-1}dy, and the LaTeX machine did lots of intelligent stuff to make it look right.