Tag Archives: CAS

Quadratics and CAS

I’m returning to my ‘blog after a prolonged absence.  My next several posts will explore ideas I shared and learned at the USACAS-10 conference hosted at Hawken School last weekend.

Finding equations for quadratic functions has long been a staple of secondary mathematics.  Historically, students are given information about some points on the graph of the quadratic, and efficient students typically figure out which form of the equation to use.  This post from my Curious Quadratics a la CAS presentation explores a significant mindset change that evolves once computer algebra enters the learning environment.

HISTORIC BACKGROUND:

Students spend lots of time (too much?) learning how to manipulate algebraic expressions between polynomial forms.  Whether distributing, factoring, or completing the square, generations of students have spent weeks changing quadratic expressions between three common algebraic forms

Standard:  y=a*x^2+b*x+c

Factored:  y=a*(x-x_1)(x-x_2)

Vertex:  y=a*(x-h)^2+k

many times without ever really knowing why.  I finally grasped deeply the reason for this about 15 years ago in a presentation by Bernhard Kutzler of Austria.  Poorly paraphrasing Bernhard’s point, he said in more elegant phrasing,

We change algebraic forms of functions because different forms reveal different properties of the function and because no single form reveals everything about a function.

While any of what follows could be eventually derived from any of the three quadratic forms, in general the Standard Form explicitly gives the y-intercept, Factored Form states x-intercepts, and Vertex Form “reveals” the vertex (duh).  When working without electronic technology, students can gain efficiency by choosing to work with a quadratic form that blends well with given information.  To demonstrate this, here’s an example of the differences between non-tech and CAS approaches.

COMPARING APPROACHES:

For an example, determine all intercepts and the vertex of the parabola that passes through (10, 210)(5, 40), and (-2, -30).

NON-TECH:  Not knowing anything about the points, use Standard form, plug in all three points, and solve the resulting system.

y=a*x^2+b*x+c
210 = 100a+10b+c
40 = 25a+5b+c
-30 = 4a-2b+c

Use any approach you want to solve this 3×3 system to get a=2, b=4, and c=-30.

That immediately gives the y-intercept at -30.  Factoring to y=2(x+5)(x-3) or using the Quadratic Formula reveals the x-intercepts at -5 and 3.  Completing the square or leveraging symmetry between the known x-intercepts gives the vertex at (-1,-32).  Some less-confident students find all of the hinted-at manipulations in this paragraph burdensome or even daunting.

CAS APPROACH:  By declaring the form you want/need, you can directly get any information you require.  In the next three lines on my Nspire CAS, notice that the only difference in my commands is the form of the equation I want in the first part of the command.  Also notice my use of lists to simplify substitution of the given points.

quad2

The last line’s output gave two solutions only because I didn’t specify which of x1 and x2 was the larger x-intercept, so my Nspire gave me both.

The -30 y-intercept appears in the first output, the vertex in the second, and the x-intercepts in the third.  Any information is equally simple to obtain.

CONCLUSION:

In the end, it’s all about knowing what you want to find and how to ask questions of the tools you have available.  Understanding the algebra behind the solutions is important, but endless repetition of these tasks is not helpful, even though it may be easy to test.

Instead, focus on using what you know, explore for patterns, and ask good questions.  …And teach with a CAS!

 

Advertisements

Binomial Expansion Variation

Several years ago, I posed on this ‘blog a problem I learned from Natalie Jackucyn:

For some integers A, B, and n, one term of the expansion of (Ax+By)^n is 27869184x^5y^3.  What are the values of A, B, and n?

In this post, I reflect for a moment on what I’ve learned from the problem and outline a solution approach before sharing a clever alternative solution one of my students this year leveraged through her CAS-enabled investigation.

WHAT I LEARNED BEFORE THIS YEAR

Mostly, I’ve loved this problem for its “reversal” of traditional binomial expansion problems that typically give A, B, and n values and ask for either complete expansions or specific terms of the polynomial.  Both of these traditional tasks are easily managed via today’s technology.  In Natalie’s variation, neither the answer nor how you would proceed are immediately obvious.

The first great part of the problem is that it doesn’t seem to give enough information.  Second, it requires solvers to understand deeply the process of polynomial expansion.  Third, unlike traditional formulations, Natalie’s version doesn’t allow students to avoid deep thinking by using technology.

In the comments to my original post, Christopher Olah and a former student, Bryan Spellman, solved the problem via factoring and an Excel document, respectively.  Given my algebraic tendencies, I hadn’t considered Bryan’s Excel “search” approach, but one could relatively easily program Excel to provide an exhaustive search.  I now think of Bryan’s approach as a coding approach to a reasonably efficient search of the sample space of possible solutions.  Most of my students’ solutions over the years essentially approach the problem the same way, but less efficiently, by using one-case-at-a-time expansions via CAS commands until they stumble upon good values for A, B, and n.  Understandably, students taking this approach typically become the most frustrated.

Christopher’s approach paralleled my own.  The x and y exponents from the expanded term show that n=5+3=8.  Expanding a generic (Ax+By)^8 then gives a bit more information.  From my TI-Nspire CAS,

binomial1

so there are 56 ways an x^5y^3 term appears in this expansion before combining like terms (explained here, if needed).  Dividing the original coefficient by 56 gives a^5b^3=497,664, the coefficient of x^5y^3.

binomial2

The values of a and b are integers, so factoring 497,664 shows these coefficients are both co-multiples of 2 and 3, but which ones?  In essence, this defines a system of equations.  The 3 has an exponent of 5, so it can easily be attributed to a, but the 11 is not a multiple of either 5 or 3, so it must be a combination.  Quick experimentation with the exponents leads to 11=5*1+3*2, so 2^1 goes to a and 2^2 goes to b.  This results in a=3*2=6 and b=2^2=4.

WHAT A STUDENT TAUGHT ME THIS YEAR

After my student, NB, arrived at a^5b^3=497,664 , she focused on roots–not factors–for her solution.  The exponents of a and b suggested using either a cubed or a fifth root.

binomial3
binomial3

The fifth root would extract only the value of a if b had only singleton factors–essentially isolating the a and b values–while the cubed root would extract a combination of a and b factors, leaving only excess a factors inside the radical.  Her investigation was simplified by the exact answers from her Nspire CAS software.

binomial4

From the fifth root output, the irrational term had exponent 1/5, not the expected 3/5, so b must have had at least one prime factor with non-singular multiplicity.  But the cubed root played out perfectly.   The exponent–2/3–matched expectation, giving a=6, and the coefficient, 24, was the product of a and b, making b=4.  Clever.

EXTENSIONS & CONCLUSION

Admittedly, NB’s solution would have been complicated if the parameter was composed of something other than singleton prime factors, but it did present a fresh, alternative approach to what was becoming a comfortable problem for me.  I’m curious about exploring other arrangements of the parameters of (Ax+By)^n to see how NB’s root-based reasoning could be extended and how it would compare to the factor solutions I used before.  I wonder which would be “easier” … whatever “easier” means.

As a ‘blog topic for another day, I’ve learned much by sharing this particular problem with several teachers over the years.  In particular, the initial “not enough information” feel of the problem statement actually indicates the presence of some variations that lead to multiple solutions.  If you think about it, NB’s root variation of the solution suggests some direct paths to such possible formulations.  As intriguing as the possibilities here are, I’ve never assigned such a variation of the problem to my students.

As I finish this post, I’m questioning why I haven’t yet taken advantage of these possibilities.  That will change. Until then, perhaps you can find some interesting or alternative approaches to the underlying systems of equations in this problem.  Can you create a variation that has multiple solutions?  Under what conditions would such a variation exist?  How many distinct solutions could a problem like this have?

Roots of Complex Numbers without DeMoivre

Finding roots of complex numbers can be … complex.

This post describes a way to compute roots of any number–real or complex–via systems of equations without any conversions to polar form or use of DeMoivre’s Theorem.  Following a “traditional approach,” one non-technology example is followed by a CAS simplification of the process.

TRADITIONAL APPROACH:

Most sources describe the following procedure to compute the roots of complex numbers (obviously including the real number subset).

  • Write the complex number whose root is sought in generic polar form.  If necessary, convert from Cartesian form.
  • Invoke DeMoivre’s Theorem to get the polar form of all of the roots.
  • If necessary, convert the numbers from polar form back to Cartesian.

As a very quick example,

Compute all square roots of -16.

Rephrased, this asks for all complex numbers, z, that satisfy  z^2=-16.  The Fundamental Theorem of Algebra guarantees two solutions to this quadratic equation.

The complex Cartesian number, -16+0i, converts to polar form, 16cis( \pi ), where cis(\theta ) = cos( \theta ) +i*sin( \theta ).  Unlike Cartesian form, polar representations of numbers are not unique, so any full rotation from the initial representation would be coincident, and therefore equivalent if converted to Cartesian.  For any integer n, this means

-16 = 16cis( \pi ) = 16 cis \left( \pi + 2 \pi n \right)

Invoking DeMoivre’s Theorem,

\sqrt{-16} = (-16)^{1/2} = \left( 16 cis \left( \pi + 2 \pi n \right) \right) ^{1/2}
= 16^{1/2} * cis \left( \frac{1}{2} \left( \pi + 2 \pi n \right) \right)
= 4 * cis \left( \frac{ \pi }{2} + \pi * n \right)

For n= \{ 0, 1 \} , this gives polar solutions, 4cis \left( \frac{ \pi }{2} \right) and 4cis \left( \frac{ 3 \pi }{2} \right) .  Each can be converted back to Cartesian form, giving the two square roots of -16:   4i and -4i .  Squaring either gives -16, confirming the result.

I’ve always found the rotational symmetry of the complex roots of any number beautiful, particularly for higher order roots.  This symmetry is perfectly captured by DeMoivre’s Theorem, but there is arguably a simpler way to compute them.

NEW(?) NON-TECH APPROACH:

Because the solution to every complex number computation can be written in a+bi form, new possibilities open.  The original example can be rephrased:

Determine the simultaneous real values of x and y for which -16=(x+yi)^2.

Start by expanding and simplifying the right side back into a+bi form.  (I wrote about a potentially easier approach to simplifying powers of i in my last post.)

-16+0i = \left( x+yi \right)^2 = x^2 +2xyi+y^2 i^2=(x^2-y^2)+(2xy)i

Notice that the two ends of the previous line are two different expressions for the same complex number(s).  Therefore, equating the real and imaginary coefficients gives a system of equations:

demoivre5

Solving the system gives the square roots of -16.

From the latter equation, either x=0 or y=0.  Substituting y=0 into the first equation gives -16=x^2, an impossible equation because x & y are both real numbers, as stated above.

Substituting x=0 into the first equation gives -16=-y^2, leading to y= \pm 4.  So, x=0 and y=-4 -OR- x=0 and y=4 are the only solutions–x+yi=0-4i and x+yi=0+4i–the same solutions found earlier, but this time without using polar form or DeMoivre!  Notice, too, that the presence of TWO solutions emerged naturally.

Higher order roots could lead to much more complicated systems of equations, but a CAS can solve that problem.

CAS APPROACH:

Determine all fourth roots of 1+2i.

That’s equivalent to finding all simultaneous x and y values that satisfy 1+2i=(x+yi)^4.  Expanding the right side is quickly accomplished on a CAS.  From my TI-Nspire CAS:

demoivre1

Notice that the output is simplified to a+bi form that, in the context of this particular example, gives the system of equations,

demoivre6

Using my CAS to solve the system,

demoivre2

First, note there are four solutions, as expected.  Rewriting the approximated numerical output gives the four complex fourth roots of 1+2i-1.176-0.334i-0.334+1.176i0.334-1.176i, and 1.176+0.334i.  Each can be quickly confirmed on the CAS:

demoivre3

CONCLUSION:

Given proper technology, finding the multiple roots of a complex number need not invoke polar representations or DeMoivre’s Theorem.  It really is as “simple” as expanding (x+yi)^n where n is the given root, simplifying the expansion into a+bi form, and solving the resulting 2×2 system of equations.

At the point when such problems would be introduced to students, their algebraic awareness should be such that using a CAS to do all the algebraic heavy lifting is entirely appropriate.

As one final glimpse at the beauty of complex roots, I entered the two equations from the last system into Desmos to take advantage of its very good implicit graphing capabilities.  You can see the four intersections corresponding to the four solutions of the system.  Solutions to systems of implicit equations are notoriously difficult to compute, so I wasn’t surprised when Desmos didn’t compute the coordinates of the points of intersection, even though the graph was pretty and surprisingly quick to generate.

demoivre4

Define Your Own Math Rule

My friend, Knox S., introduced me to this problem.  According to a post on The Telegraph’s Education page, this was originally  posted on Facebook by Randall Jones.

The first line is fine by the standard rules of arithmetic, but as soon as you read the 2nd and 3rd lines, you know something is amiss.  What could be the output of line 4?

The Telegraph post above claims there are two answers.  Sadly, that post suggests there are only two solutions.  The reality is that there is an infinite number of correct answers.

I first share the two most commonly proffered solutions suggested by the Telegraph as the only answers.  I follow this with Knox’s clever use of an incremental number base.  Finally, I offer a more generalized approach to support my claim of many more solutions.

STANDARD SOLUTIONS

  • THE ANSWER IS 40:  After the first line, add the previous answer to next sum.

knox1

Consistent with the first three lines, the same rule to line 4 “proves” the answer is 40:

knox2

While nothing requires it, this approach is recursive.  I’ve not seen anyone say this, but the 40 approach requires the equations to appear in the given order.  If you give the equations in a different order, the rule is no longer consistent.  In particular, if you wanted a 5th line, what would it be?  There’s nothing clear about how to extend this solution.

  • THE ANSWER IS 96:  Alternatively, you can multiply the two numbers on the left and add that product to the first number.  This procedure is consistent with the first three lines, so the solution to line 4 must be 96:

knox3

The nice thing about this approach is that the solution is explicit, not recursive.  What’s obviously counter-intuitive is why you would first multiply the given numbers, and then why you would add the result to the first number, not the second.  This approach is consistent with the given information, so it is valid.

Unlike the first solution, this multiplicative approach is not commutative.  By this rule, 1+4 yields 5, as shown, but 4+1 would be 4+(4*1)=8.  Nothing in the problem statement required commutativity, so no worries.

Another good aspect of this algorithm is that the order of the equations is now irrelevant.  It applies no matter what numbers are “added” on the left side of the equation.  This is definitely more satisfying.

CHANGE THE NUMBER BASE

  • THE ANSWER IS 201:  Knox noticed that if you changed the number base, you could find another legit pattern.  The first line is standard arithmetic, but how could the next lines be consistent, too?  You know 2+5 doesn’t give 12 in standard base-10 arithmetic, but if you use base-5, 2+5=7=1*5^1+2*5^0=12_5.

    Unfortunately, in base-5, line 1 would be (1+4)_5=10_5 and line 3 would be (3+6)_5=14_5, both inconsistent.  Knox’s cleverest move was to vary the number base.  The 3rd line is true in base-4; since the 1st line is true in any base larger than five, he found a consistent pattern by applying base-6 to line 1:

knox4

Following this pattern, the next line would be base-3, giving 201 as the answer:

knox5

The best part of Knox’s solution is that he maintains the addition integrity of the left side.  The down-side is that this approach works for only one more line.  Any 5th line would give a base-2 (binary) answer, and since base-1 does not exist, the problem would end there.

Knox’s approach also allows you to use any numbers you want for the left-hand sums.  But notice that answers depend on where you write the sum.  For example, if (2+5) was in any other line, you would not get 12.  In line 1, (2+5)_6=11_6, in line 3, you’d get (2+5)_4=13_4.

CREATE YOUR OWN SOLUTION

By now, you should see that any any rule could work so long as you are consistent.  Because standard arithmetic does not apply, solvers should feel free to invoke any functions or algorithms desired.  One way to do this is to think of each line as the inputs (left side) and output (right side) of a three-variable function.

  • THE ANSWER IS 96:  One possible function is z=f(x,y)=a*x^2+b*y^2+c for some values of a, b, and c that passes through (1,4,5), (2,5,12), and (3,6,21).  I used my TI-Nspire CAS to solve the resulting system:

    knox6

    That means if x and y are the given left-side numbers and z is the right-side answer, the equation \frac{1}{3}*x+\frac{2}{3}*y-6=z satisfies the first three lines and the answer to line 4 is 96

    knox7

  • THE ANSWER IS \displaystyle \frac{2574}{29}:  If you can square the inputs, why not cube them?  That means another possible function is z=f(x,y)=a*x^3+b*y^3+c.  My CAS solution of the resulting system leads to the fractional answer:

    knox9

The first three given equations essentially define three ordered triples–(1,4,5), (2,5,12), and (3,6,21)–so almost any equation you conceive with three unknown coefficients can be used to create a 3×3 system of equations.  The fractional solution for line 4 may not be as satisfying as any of the earlier approaches using only integers, but these last two examples make it clear that there should be an infinite number of solutions.

These last two solutions are especially nice because they are explicit and don’t depend on the order of the given information.  You can choose any two numbers to “add”, and the algorithms will work.

Notice also that all of these functions, except for Knox’s, are non-commutative.  No worries, the problem already broke free of standard rules in line 2.

ONE THAT DIDN’T WORK

The last two examples prove the existence of quadratic and cubic solutions, so why not a linear solution?  In other words, is there a 3D plane in the form z=a*x+b*y+c containing the given points?

knox8

Unfortunately, the resulting 3×3 system didn’t solve. The determinant of the coefficient matrix is zero, suggesting an inconsistent or dependent system.  Upon further inspection, subtracting line 1 from line 2 in the planar system gives a+b=7.  Similarly, subtracting line 2 from line 3 gives a+b=9.  Since both can’t be simultaneously true, the system is inconsistent and has no solution.  It was worth the effort.

CONCLUSION

Since standard arithmetic didn’t apply after the first line and no other restrictions were in play, that opened the door to lots of creativity.  The many different solutions to this problem all hinge on finding some function–any function–that satisfied the first three lines.  Find one of these, and the last line is simple.  That some attempts won’t work is no hinderance.  Even when standard algorithms seem to apply, there is almost always the possibility of some creative twist when working with numerical sequences.

So, whenever you’re faced with a non-standard system, have fun, be creative, and develop something unexpected.

Party Ratios

I find LOTS of great middle school problems from @Five_Triangles on Twitter.  Their post two days ago was no exception.

The problem requires a little stamina, but can be approached many ways–two excellent criteria for worthy student explorations.  That it has some solid extensions makes it even better.  Following are a few different solution approaches some colleagues and I created.

INITIAL THOUGHTS, VISUAL ORGANIZATION, & A SOLUTION

The most challenging part of this problem is data organization.  My first thoughts were for a 2-circle Venn Diagram–one for gender and one for age.  And these types of Venn Diagrams are often more easily understood, in my experience, in 2×2 Table form with extra spaces for totals.  Here’s what I set up initially.

ratio2

The ratio of Women:Girls was 11:4, so the 24 girls meant each “unit” in this ratio accounted for 24/4=6 people.  That gave 11*6=66 women and 66+24=90 females.

ratio3

At this point, my experience working with algebraic problems tempted me to overthink the situation.  I was tempted to let B represent the unknown number of boys and set up some equations to solve.  Knowing that most 6th graders would not think about variables, I held back that instinct in an attempt to discover what a less-experienced mind might try. I present my initial algebra solution below.

The 5:3 Male:Female ratio told me that each “gender unit” represented 90/3=30 people.  That meant there were 5*30=150 men and 240 total people at the party.

ratio4

Then, the 4:1 Adult:Children ratio showed how to age-divide every group of 5 partygoers.  With 240/5=48 such groups, there were 48 children and 4*48=192 adults.  Subtracting the already known 66 women gave the requested answer:  192-66=126 men.

ratio5

While this Venn Diagram/Table approach made sense to me, I was concerned that it was a moderately sophisticated and not quite intuitive problem-solving technique for younger middle school students.

WHAT WOULD A MIDDLE SCHOOLER THINK?

A middle school teaching colleague, Becky, offered a different solution I could see students creating.

Completely independently, she solved the problem in exactly the same order I did using ratio tables to manage the scaling at each step instead of my “unit ratios”.  I liked her visual representation of the 4:1 Adults:Children ratio to find the number of adults, which gave the requested number of men.  I suspect many more students would implicitly or explicitly use some chunking strategies like the visual representation to work the ratios.

Ratio1

 

WHY HAVE JUST ONE SOLUTION?

Math problems involving ratios can usually be opened up to allow multiple, or even an infinite number of solutions.  This leads to some interesting problem extensions if you eliminate the “24 girls” restriction.  Here are a few examples and sample solutions.

What is the least number of partygoers?

For this problem, notice from the table above that all of the values have a common factor of 6.  Dividing the total partygoers by this reveals that 240/6=40 is the least number.  Any multiple of this number is also a legitimate solution.

Interestingly, the 11:4 Women:Girls ratio becomes explicitly obvious when you scale the table down to its least common value.

ratio6My former student and now colleague, Teddy, arrived at this value another way.  Paraphrasing, he noted that the 5:3 Male:Female ratio meant any valid total had to be a multiple of 5+3=8.  Likewise, the 4:1 Adult:Child ratio requires totals to be multiples of 4+1=5.  And the LCM of 8 & 5 is 40, the same value found in the preceding paragraph.

What do all total partygoer numbers have in common?

As explained above, any multiple of 40 is a legitimate number of partygoers.

If the venue could support no more than 500 attendees, what is the maximum number of women attending?

12*40=480 is the greatest multiple of 40 below 500.  Because 480 is double the initial problem’s total, 66*2=132 is the maximum number of women.

Note that this can be rephrased to accommodate any other gender/age/total target.

Under the given conditions, will the number of boys and girls at the party ever be identical?

As with all ratio problems, larger values are always multiples of the least common solution.  That means the number of boys and girls will always be identical or always be different.  From above, you can deduce that the numbers of boys and girls at the party under the given conditions will both be multiples of 4.

What variations can you and/or your students create?

RESOLVING THE INITIAL ALGEBRA

Now to the solution variation I was initially inclined to produce.  After initially determining 66 women from the given 24 girls, let B be the unknown number of boys.  That gives B+24 children.  It was given that adults are 4 times as numerous as children making the number of adults 4(B+24)=4B+96.  Subtracting the known 66 women leaves 4B+30 men.  Compiling all of this gives

ratio7

The 5:3 Male:Female ratio means \displaystyle \frac{5}{3} = \frac{5B+30}{90} \longrightarrow B=24, the same result as earlier.

 

ALGEBRA OVERKILL

Winding through all of that algebra ultimately isn’t that computationally difficult, but it certainly is more than typical 6th graders could handle.

But the problem could be generalized even further, as Teddy shared with me.  If the entire table were written in variables with W=number of women, M=men, G=girls, and B=boys, the given ratios in the problem would lead to a reasonably straightforward 4×4 system of equations.  If you understand enough to write all of those equations, I’m certain you could solve them, so I’d feel confident allowing a CAS to do that for me.  My TI-Nspire gives this.

ratio8

And that certainly isn’t work you’d expect from any 6th grader.

CONCLUSION

Given that the 11:4 Women:Girls ratio was the only “internal” ratio, it was apparent in retrospect that all solutions except the 4×4 system approach had to find the female values first.  There are still several ways to resolve the problem, but I found it interesting that while there was no “direct route”, every reasonable solution started with the same steps.

Thanks to colleagues Teddy S & Becky M for sharing their solution proposals.

Stats Exploration Yields Deeper Understanding

or “A lesson I wouldn’t have learned without technology”

Last November, some of my AP Statistics students were solving a problem involving a normal distribution with an unknown mean.  Leveraging the TI Nspire CAS calculators we use for all computations, they crafted a logical command that should have worked.  Their unexpected result initially left us scratching heads.  After some conversations with the great folks at TI, we realized that what at first seemed perfectly reasonable for a single answer, in fact had two solutions.  And it took until the end of this week for another student to finally identify and resolve the mysterious results.  This ‘blog post recounts our journey from a questionable normal probability result to a rich approach to confidence intervals.

THE INITIAL PROBLEM

I had assigned an AP Statistics free response question about a manufacturing process that could be manipulated to control the mean distance its golf balls would travel.  We were told that the process created balls with a normally distributed distance of 288 yards and a standard deviation of 2.8 yards.  The first part asked students to find the probability of balls traveling more than an allowable 291.2 yards.  This was straightforward.  Find the area under a normal curve with a mean of 288 and a standard deviation of 2.8 from 291.2 to infinity.  The Nspire (CAS and non-CAS) syntax for this is:

golf1

[Post publishing note: See Dennis’ comment below for a small correction for the non-CAS Nspires.  I forgot that those machines don’t accept “infinity” as a bound.]

As 12.7% of the golf balls traveling too far is obviously an unacceptably high percentage, the next part asked for the mean distance needed so only 99% of the balls traveled allowable distances.  That’s when things got interesting.

A “LOGICAL” RESPONSE RESULTS IN A MYSTERY

Their initial thought was that even though they didn’t know the mean, they now knew the output of their normCdf command.  Since the balls couldn’t travel a negative distance and zero was many standard deviations from the unknown mean, the following equation with representing the unknown mean should define the scenario nicely.

golf2

Because this was an equation with a single unknown, we could now use our CAS calculators to solve for the missing parameter.

golf3

Something was wrong.  How could the mean distance possibly be just 6.5 yards?  The Nspires are great, reliable machines.  What happened?

I had encountered something like this before with unexpected answers when a solve command was applied to a Normal cdf with dual finite bounds .  While it didn’t seem logical to me why this should make a difference, I asked them to try an infinite lower bound and also to try computing the area on the other side of 291.2.  Both of these provided the expected solution.

golf4

The caution symbol on the last line should have been a warning, but I honestly didn’t see it at the time.  I was happy to see the expected solution, but quite frustrated that infinite bounds seemed to be required.  Beyond three standard deviations from the mean of any normal distribution, almost no area exists, so how could extending the lower bound from 0 to negative infinity make any difference in the solution when 0 was already \frac{291.2}{2.8}=104 standard deviations away from 291.2?  I couldn’t make sense of it.

My initial assumption was that something was wrong with the programming in the Nspire, so I emailed some colleagues I knew within CAS development at TI.

GRAPHS REVEAL A HIDDEN SOLUTION

They reminded me that statistical computations in the Nspire CAS were resolved through numeric algorithms–an understandable approach given the algebraic definition of the normal and other probability distribution functions.  The downside to this is that numeric solvers may not pick up on (or are incapable of finding) difficult to locate or multiple solutions.  Their suggestion was to employ a graph whenever we got stuck.  This, too, made sense because graphing a function forced the machine to evaluate multiple values of the unknown variable over a predefined domain.

It was also a good reminder for my students that a solution to any algebraic equation can be thought of as the first substitution solution step for a system of equations.  Going back to the initially troublesome input, I rewrote normCdf(0,291.2,x,2.8)=0.99 as the system

y=normCdf(0,291.2,x,2.8)
y=0.99

and “the point” of intersection of that system would be the solution we sought.  Notice my emphasis indicating my still lingering assumptions about the problem.  Graphing both equations shone a clear light on what was my persistent misunderstanding.

golf5

I was stunned to see two intersection solutions on the screen.  Asking the Nspire for the points of intersection revealed BOTH ANSWERS my students and I had found earlier.

golf6

If both solutions were correct, then there really were two different normal pdfs that could solve the finite bounded problem.  Graphing these two pdfs finally explained what was happening.

By equating the normCdf result to 0.99 with FINITE bounds, I never specified on which end the additional 0.01 existed–left or right.  This graph showed the 0.01 could have been at either end, one with a mean near the expected 284 yards and the other with a mean near the unexpected 6.5 yards.  The graph below shows both normal curves with the 6.5 solution having an the additional 0.01 on the left and the 284 solution with the 0.01 on the right.

golf7

The CAS wasn’t wrong in the beginning.  I was.  And as has happened several times before, the machine didn’t rely on the same sometimes errant assumptions I did.  My students had made a very reasonable assumption that the area under the normal pdf for the golf balls should start only 0 (no negative distances) and inadvertently stumbled into a much richer problem.

A TEMPORARY FIX

The reason the infinity-bounded solutions didn’t give the unexpected second solution is that it is impossible to have the unspecified extra 0.01 area to the left of an infinite lower or upper bound.

To avoid unexpected multiple solutions, I resolved to tell my students to use infinite bounds whenever solving for an unknown parameter.  It was a little dissatisfying to not be able to use my students’ “intuitive” lower bound of 0 for this problem, but at least they wouldn’t have to deal with unexpected, counterintuitive results.

Surprisingly, the permanent solution arrived weeks later when another student shared his fix for a similar problem when computing confidence interval bounds.

A PERMANENT FIX FROM AN UNEXPECTED SOURCE

I really don’t like the way almost all statistics textbooks provide complicated formulas for computing confidence intervals using standardized z- and t-distribution critical scores.  Ultimately a 95% confidence interval is nothing more than the bounds of the middle 95% of a probability distribution whose mean and standard deviation are defined by a sample from the overall population.  Where the problem above solved for an unknown mean, on a CAS, computing a confidence interval follows essentially the same reasoning to determine missing endpoints.

My theme in every math class I teach is to memorize as little as you can, and use what you know as widely as possible.  Applying this to AP Statistics, I never reveal the existence of confidence interval commands on calculators until we’re 1-2 weeks past their initial introduction.  This allows me to develop a solid understanding of confidence intervals using a variation on calculator commands they already know.

For example, assume you need a 95% confidence interval of the percentage of votes Bernie Sanders is likely to receive in Monday’s Iowa Caucus.  The CNN-ORC poll released January 21 showed Sanders leading Clinton 51% to 43% among 280 likely Democratic caucus-goers.  (Read the article for a glimpse at the much more complicated reality behind this statistic.)  In this sample, the proportion supporting Sanders is approximately normally distributed with a sample p=0.51 and sample standard deviation of p of \sqrt((.51)(.49)/280)=0.0299.  The 95% confidence interval is the defined by the bounds containing the middle 95% of the data of this normal distribution.

Using the earlier lesson, one student suggested finding the bounds on his CAS by focusing on the tails.

golf8

giving a confidence interval of (0.45, 0.57) for Sanders for Monday’s caucus, according to the method of the CNN-ORC poll from mid-January.  Using a CAS keeps my students focused on what a confidence interval actually means without burying them in the underlying computations.

That’s nice, but what if you needed a confidence interval for a sample mean?  Unfortunately, the t-distribution on the Nspire is completely standardized, so confidence intervals need to be built from critical t-values.  Like on a normal distribution, a 95% confidence interval is defined by the bounds containing the middle 95% of the data.  One student reasonably suggested the following for a 95% confidence interval with 23 degrees of freedom.  I really liked the explicit syntax definition of the confidence interval.

golf9

Alas, the CAS returned the input.  It couldn’t find the answer in that form.  Cognizant of the lessons learned above, I suggested reframing the query with an infinite bound.

golf10

That gave the proper endpoint, but I was again dissatisfied with the need to alter the input, even though I knew why.

That’s when another of my students spoke up to say that he got the solution to work with the initial commands by including a domain restriction.

golf11

Of course!  When more than one solution is possible, restrict the bounds to the solution range you want.  Then you can use the commands that make sense.

FIXING THE INITIAL APPROACH

That small fix finally gave me the solution to the earlier syntax issue with the golf ball problem.  There were two solutions to the initial problem, so if I bounded the output, they could use their intuitive approach and get the answer they needed.

If a mean of 288 yards and a standard deviation of 2.8 yards resulted in 12.7% of the area above 291.2, then it wouldn’t take much of a left shift in the mean to leave just 1% of the area above 291.2. Surely that unknown mean would be no lower than 3 standard deviations below the current 288, somewhere above 280 yards.  Adding that single restriction to my students’ original syntax solved their problem.

golf13

Perfection!

CONCLUSION

By encouraging a deep understanding of both the underlying statistical content AND of their CAS tool, students are increasingly able to find creative solutions using flexible methods and expressions intuitive to them.  And shouldn’t intellectual strength, creativity, and flexibility be the goals of every learning experience?

 

Best Algebra 2 Lab Ever

This post shares what I think is one of the best, inclusive, data-oriented labs for a second year algebra class.  This single experiment produces linear, quadratic, and exponential (and logarithmic) data from a lab my Algebra 2 students completed this past summer.  In that class, I assigned frequent labs where students gathered real data, determined models to fit that data, and analyzed goodness of the models’ fit to the data.   I believe in the importance of doing so much more than just writing an equation and moving on.

For kicks, I’ll derive an approximation for the coefficient of gravity at the end.

THE LAB:

On the way to school one morning last summer, I grabbed one of my daughters’ “almost fully inflated” kickballs and attached a TI CBR2 to my laptop and gathered (distance, time) data from bouncing the ball under the Motion Sensor.  NOTE:  TI’s CBR2 can connect directly to their Nspire and TI84 families of graphing calculators.  I typically use computer-based Nspire CAS software, so I connected the CBR via my laptop’s USB port.  It’s crazy easy to use.

One student held the CBR2 about 1.5-2 meters above the ground while another held the ball steady about 20 cm below the CBR2 sensor.  When the second student released the ball, a third clicked a button on my laptop to gather the data:  time every 0.05 seconds and height from the ground.  The graphed data is shown below.  In case you don’t have access to a CBR or other data gathering devices, I’ve uploaded my students’ data in this Excel file.

Bounce1

Remember, this is data was collected under far-from-ideal conditions.  I picked up a kickball my kids left outside on my way to class.  The sensor was handheld and likely wobbled some, and the ball was dropped on the well-worn carpet of our classroom floor.  It is also likely the ball did not remain perfectly under the sensor the entire time.  Even so, my students created a very pretty graph on their first try.

For further context, we did this lab in the middle of our quadratics unit that was preceded by a unit on linear functions and another on exponential and logarithmic functions.  So what can we learn from the bouncing ball data?

LINEAR 1:  

While it is very unlikely that any of the recorded data points were precisely at maximums, they are close enough to create a nice linear pattern.

As the height of a ball above the ground helps determine the height of its next bounce (height before –> energy on impact –> height after), the eight ordered pairs (max height #n, max height #(n+1) ) from my students’ data are shown below

bounce2

This looks very linear.  Fitting a linear regression and analyzing the residuals gives the following.

bounce3

The data seems to be close to the line, and the residuals are relatively small, about evenly distributed above and below the line, and there is no apparent pattern to their distribution.  This confirms that the regression equation, y=0.673x+0.000233, is a good fit for the = height before bounce and = height after bounce data.

NOTE:  You could reasonably easily gather this data sans any technology.  Have teams of students release a ball from different measured heights while others carefully identify the rebound heights.

The coefficients also have meaning.  The 0.673 suggests that after each bounce, the ball rebounded to 67.3%, or 2/3, of its previous height–not bad for a ball plucked from a driveway that morning.  Also, the y-intercept, 0.000233, is essentially zero, suggesting that a ball released 0 meters from the ground would rebound to basically 0 meters above the ground.  That this isn’t exactly zero is a small measure of error in the experiment.

EXPONENTIAL:

Using the same idea, consider data of the form (x,y) = (bounce number, bounce height). the graph of the nine points from my students’ data is:

bounce4

This could be power or exponential data–something you should confirm for yourself–but an exponential regression and its residuals show

bounce5

While something of a pattern seems to exist, the other residual criteria are met, making the exponential regression a reasonably good model: y = 0.972 \cdot (0.676)^x.  That means bounce number 0, the initial release height from which the downward movement on the far left of the initial scatterplot can be seen, is 0.972 meters, and the constant multiplier is about 0.676.  This second number represents the percentage of height maintained from each previous bounce, and is therefore the percentage rebound.  Also note that this is essentially the same value as the slope from the previous linear example, confirming that the ball we used basically maintained slightly more than 2/3 of its height from one bounce to the next.

And you can get logarithms from these data if you use the equation to determine, for example, which bounces exceed 0.2 meters.

bounce12

So, bounces 1-4 satisfy the requirement for exceeding 0.20 meters, as confirmed by the data.

A second way to invoke logarithms is to reverse the data.  Graphing x=height and y=bounce number will also produce the desired effect.

QUADRATIC:

Each individual bounce looks like an inverted parabola.  If you remember a little physics, the moment after the ball leaves the ground after each bounce, it is essentially in free-fall, a situation defined by quadratic movement if you ignore air resistance–something we can safely assume given the very short duration of each bounce.

I had eight complete bounces I could use, but chose the first to have as many data points as possible to model.  As it was impossible to know whether the lowest point on each end of any data set came from the ball moving up or down, I omitted the first and last point in each set.  Using (x,y) = (time, height of first bounce) data, my students got:

bounce6

What a pretty parabola.  Fitting a quadratic regression (or manually fitting one, if that’s more appropriate for your classes), I get:

bounce7

Again, there’s maybe a slight pattern, but all but two points are will withing  0.1 of 1% of the model and are 1/2 above and 1/2 below.  The model, y=-4.84x^2+4.60x-4.24, could be interpreted in terms of the physics formula for an object in free fall, but I’ll postpone that for a moment.

LINEAR 2:

If your second year algebra class has explored common differences, your students could explore second common differences to confirm the quadratic nature of the data.  Other than the first two differences (far right column below), the second common difference of all data points is roughly 0.024.  This raises suspicions that my student’s hand holding the CBR2 may have wiggled during the data collection.

bounce8

Since the second common differences are roughly constant, the original data must have been quadratic, and the first common differences linear. As a small variation for each consecutive pair of (time, height) points, I had my students graph (x,y) = (x midpoint, slope between two points):

bounce10

If you get the common difference discussion, the linearity of this graph is not surprising.  Despite those conversations, most of my students seem completely surprised by this pattern emerging from the quadratic data.  I guess they didn’t really “get” what common differences–or the closely related slope–meant until this point.

bounce11

Other than the first three points, the model seems very strong.  The coefficients tell an even more interesting story.

GRAVITY:

The equation from the last linear regression is y=4.55-9.61x.  Since the data came from slope, the y-intercept, 4.55, is measured in m/sec.  That makes it the velocity of the ball at the moment (t=0) the ball left the ground.  Nice.

The slope of this line is -9.61.  As this is a slope, its units are the y-units over the x-units, or (m/sec)/(sec).  That is, meters per squared second.  And those are the units for gravity!  That means my students measured, hidden within their data, an approximation for coefficient of gravity by bouncing an outdoor ball on a well-worn carpet with a mildly wobbly hand holding a CBR2.  The gravitational constant at sea-level on Earth is about -9.807 m/sec^2.  That means, my students measurement error was about \frac{9.807-9.610}{9.807}=2.801%.  And 2.8% is not a bad measurement for a very unscientific setting!

CONCLUSION:

Whenever I teach second year algebra classes, I find it extremely valuable to have students gather real data whenever possible and with every new function, determine models to fit their data, and analyze the goodness of the model’s fit to the data.  In addition to these activities just being good mathematics explorations, I believe they do an excellent job exposing students to a few topics often underrepresented in many secondary math classes:  numerical representations and methods, experimentation, and introduction to statistics.  Hopefully some of the ideas shared here will inspire you to help your students experience more.