Tag Archives: polar functions

Confidence Intervals via graphs and CAS

Confidence intervals (CIs) are a challenging topic for many students, a task made more challenging, in my opinion, because many (most?) statistics texts approach CIs via z-scores.  While repeatedly calculating CI endpoints from standard deviations explains the underlying mathematical structure, it relies on an (admittedly simple) algebraic technique that predates classroom technology currently available for students on the AP Statistics exam.

Many (most?) statistics packages now include automatic CI commands.  Unfortunately for students just learning what a CI means, automatic commands can become computational “black boxes.”  Both CAS and graphing techniques offer a strong middle ground–enough foundation to reinforce what CIs mean with enough automation to avoid unnecessary symbol manipulation time.

In most cases, this is accomplished by understanding a normal cumulative distribution function (cdf) as a function, not just as an electronic substitute for normal probability tables of values.  In this post, I share two alternatives each for three approaches to determining CIs using a TI-Nspire CAS.

SAMPLE PROBLEM:

In 2010, the mean ACT mathematics score for all tests was 21.0 with standard deviation 5.3.  Determine a 90% confidence interval for the math ACT score of an individual chosen at random from all 2010 ACT test takers.

METHOD 1a — THE STANDARD APPROACH:

A 90% CI excludes the extreme 5% on each end of the normal distribution.  Using an inverse normal command gives the z-scores at the corresponding 5% and 95% locations on the normal cdf.

normCAS6

Of course, utilizing symmetry would have required only one command.  To find the actual boundary points of the CI, standardize the endpoints, x, and equate that to the two versions of the z-scores.

\displaystyle \frac{x-21.0}{5.3} = \pm 1.64485

Solving these rational equations for x gives x=12.28 and x=29.72, or CI = \left[ 12.28,29.72 \right] .

Most statistics software lets users avoid this computation with optional parameters for the mean and standard deviation of non-standard normal curves.  One of my students last year used this in the next variation.

METHOD 1b — INTRODUCING LISTS:

After using lists as shortcuts on our TI-Nspires last year for evaluating functions at several points simultaneously, one of my students creatively applied them to the inverse normal command, entering the separate 0.05 and 0.95 cdf probabilities as a single list.  I particularly like how the output for this approach outputs looks exactly like a CI.

CI4

METHOD 2a — CAS:

The endpoints of a CI are just endpoints of an interval on a normal cdf, so why not avoid the algebra and additional inverse normal command and determine the endpoints via CAS commands?  My students know the solve command from previous math classes, so after learning the normal cdf command, there are very few situations for them to even use the inverse.

CI1

This approach keeps my students connected to the normal cdf and solving for the bounds quickly gives the previous CI bounds.

METHOD 2b (Alas, not yet) — CAS and LISTS:

Currently, the numerical techniques the TI-Nspire family uses to solve equations with statistics commands don’t work well with lists in all situations.  Curiously, the Nspire currently can’t handle the solve+lists equivalent of the inverse normal+lists approach in METHOD 1b.

CI5

But, I’ve also learned that problems not easily solved in an Nspire CAS calculator window typically crack pretty easily when translated to their graphical equivalents.

METHOD 3a — GRAPHING:

This approach should work for any CAS or non-CAS graphing calculator or software with statistics commands.

Remember the “f” in cdf.  A cumulative distribution function is a function, and graphing calculators/software treats them as such.  Replacing the normCdf upper bounds with an x for standard graphing syntax lets one graph the normal cdf (below).

Also remember that any algebraic equation can be solved graphically by independently graphing each side of the equation and treating the resulting pair of equations as a system of equations.  In this case, graphing y=0.05 and y=0.95 and finding the points of intersection gives the values of the CI.

CI2

METHOD 3b — GRAPHING and LISTS:

SIDENOTE:  While lists didn’t work with the CAS in the case of METHOD 2b, the next screen shows the syntax to graph both ends of the CI using lists with a single endpoint equation.

CI3

The lists obviously weren’t necessary here, but the ability to use lists is a very convenient feature on the TI-Nspire that I’ve leveraged countless times to represent families of functions.  In my opinion, using them in METHOD 3b again leverages that same idea, that the endpoints you seek are different aspects of the same family–the CI.

CONCLUSION:

There are many ways for students in their first statistics courses to use what they already know to determine the endpoints of a confidence interval.  And keeping students attention focused on new ways to use old information solidifies both old and new content.  Eliminating unnecessary computations that aren’t the point of most of introductory statistics anyway is an added bonus.

Happy learning everyone…

Advertisements

CAS Presentations at USACAS-9

I had two presentations at last Saturday’s USACAS-9 conference at Hawken School in Cleveland, OH.  Following are outline descriptions of the two sessions with links to the PowerPoint, pdf, and .tns files I used.  I’m also adding all of this information to the Conference Presentations tab of this ‘blog.

Powerful Student Proofs

This session started with a brief introduction to a lab that first caught my eye at the first USACAS conference years ago.

You know how the graph of y=ax^2+bx+c behaves when you vary a and c, but what happens when you change b?

I ‘blogged on this problem here and here.  In the session, we used TI-Nspire file QuadExplore.

Next, we explored briefly the same review of trigonometric and polar graphs not as static parent functions under static transformations, but as dynamic curves oscillating between their ceilings and floors.  In the session, we used TI-Nspire file Intro Polar.

Having a complete grasp of polar graphs of limacons, cardioids, rose curves, and hybrids of these, I investigated what would happen for curves of the family r=cos \left( \frac{\theta}{k} \right).  Curiously, for k=3, I encountered a curve that looked like a horizontal translation of limacons–something that just shouldn’t happen within polar coordinates.

Polar1

One of my former students, Sara, used a CAS to convert a polar curve to Cartesian, translate the curve, and convert back to polar.  She then identified and solved a trig identity to confirm what the graph suggested.  A complete description of Sara’s proof is below.  I originally ‘blogged on Sara’s work here which was a much more elegant solution to the problem than my initial attempt.  It’s always cool when a student’s work is better than her teacher’s!  I used TI-Nspire file Polar Fractions in Saturday’s session.

The last example presented itself when I created a document to model the family of conic curves resulting from manipulating the coefficients of Ax^2+Bxy+Cy^2+Dx+Ey+F=0.  After I created  dynamic points for the foci of the conics, something unusual happened when the E parameter for horizontal ellipses and hyperbolas varied.

Image5b

Image5a

The foci for hyperbolas followed an ellipse, and the locus of elliptical foci appeared to be a hyperbola.  Another former student, Lilly, proved this property to be true.  A detailed explanation of Lilly’s proof is below.  We were fortunate to have Lilly’s work published in the Mathematics Teacher in May, 2014.

To demonstrate this final part of the session, I used TI-Nspire file Hidden Conic Behavior.

Here is my PowerPoint file for Powerful Student Proofs.  A more detailed sketch of the session and the student proofs is below.

Bending Asymptotes, Bouncing Off Infinity, and Going Beyond

The basic proposal was that adding the Reciprocal transformation to the palette of constant dilations and translations dramatically simplified understanding of the behavior of rational functions around even and odd vertical asymptotes (bouncing off and passing through infinity).  Just like lead coefficients of polynomials determine their end behavior, so, too, do the lead coefficients of proper rational expressions define the end behavior of rational functions.

Extending the idea of reciprocating and transforming functions, you can quickly explain exponential decay from exponential growth, derive the graphs of y=\frac{1}{x} and y=\frac{1}{x^2}, and completely explain why logistic functions behave the way they do.

We finished with a quick exploration of trigonometric and polar graphs not as static parent functions under static transformations, but as dynamic curves oscillating between their ceilings and floors.

I used TI-Nspire Bending and Intro Polar files in the demonstration.  Here is my outline PowerPoint file for Bending Asymptotes.

Trig Identities with a Purpose

Yesterday, I was thinking about some changes I could introduce to a unit on polar functions.  Realizing that almost all of the polar functions traditionally explored in precalculus courses have graphs that are complete over the interval 0\le\theta\le 2\pi, I wondered if there were any interesting curves that took more than 2\pi units to graph.

My first attempt was r=cos\left(\frac{\theta}{2}\right) which produced something like a merged double limaçon with loops over its 4\pi period.

Trying for more of the same, I graphed r=cos\left(\frac{\theta}{3}\right) guessing (without really thinking about it) that I’d get more loops.  I didn’t get what I expected at all.

Wow!  That looks exactly like the image of a standard limaçon with a loop under a translation left of 0.5 units.

Further exploration confirms that r=cos\left(\frac{\theta}{3}\right) completes its graph in 3\pi units while r=\frac{1}{2}+cos\left(\theta\right) requires 2\pi units.

As you know, in mathematics, it is never enough to claim things look the same; proof is required.  The acute challenge in this case is that two polar curves (based on angle rotations) appear to be separated by a horizontal translation (a rectangular displacement).  I’m not aware of any clean, general way to apply a rectangular transformation to a polar graph or a rotational transformation to a Cartesian graph.  But what I can do is rewrite the polar equations into a parametric form and translate from there.

For 0\le\theta\le 3\pi , r=cos\left(\frac{\theta}{3}\right) becomes \begin{array}{lcl} x_1 &= &cos\left(\frac{\theta}{3}\right)\cdot cos\left (\theta\right) \\ y_1 &= &cos\left(\frac{\theta}{3}\right)\cdot sin\left (\theta\right) \end{array} .  Sliding this \frac{1}{2} a unit to the right makes the parametric equations \begin{array}{lcl} x_2 &= &\frac{1}{2}+cos\left(\frac{\theta}{3}\right)\cdot cos\left (\theta\right) \\ y_2 &= &cos\left(\frac{\theta}{3}\right)\cdot sin\left (\theta\right) \end{array} .

This should align with the standard limaçon, r=\frac{1}{2}+cos\left(\theta\right) , whose parametric equations for 0\le\theta\le 2\pi  are \begin{array}{lcl} x_3 &= &\left(\frac{1}{2}+cos\left(\theta\right)\right)\cdot cos\left (\theta\right) \\ y_3 &= &\left(\frac{1}{2}+cos\left(\theta\right)\right)\cdot sin\left (\theta\right) \end{array} .

The only problem that remains for comparing (x_2,y_2) and (x_3,y_3) is that their domains are different, but a parameter shift can handle that.

If 0\le\beta\le 3\pi , then (x_2,y_2) becomes \begin{array}{lcl} x_4 &= &\frac{1}{2}+cos\left(\frac{\beta}{3}\right)\cdot cos\left (\beta\right) \\ y_4 &= &cos\left(\frac{\beta}{3}\right)\cdot sin\left (\beta\right) \end{array} and (x_3,y_3) becomes \begin{array}{lcl} x_5 &= &\left(\frac{1}{2}+cos\left(\frac{2\beta}{3}\right)\right)\cdot cos\left (\frac{2\beta}{3}\right) \\ y_5 &= &\left(\frac{1}{2}+cos\left(\frac{2\beta}{3}\right)\right)\cdot sin\left (\frac{2\beta}{3}\right) \end{array} .

Now that the translation has been applied and both functions operate over the same domain, the two functions must be identical iff x_4 = x_5 and y_4 = y_5 .  It’s time to prove those trig identities!

Before blindly manipulating the equations, I take some time to develop some strategy.  I notice that the (x_5, y_5) equations contain only one type of angle–double angles of the form 2\cdot\frac{\beta}{3} –while the (x_4, y_4) equations contain angles of two different types, \beta and \frac{\beta}{3} .  It is generally easier to work with a single type of angle, so my strategy is going to be to turn everything into trig functions of double angles of the form 2\cdot\frac{\beta}{3} .

\displaystyle \begin{array}{lcl} x_4 &= &\frac{1}{2}+cos\left(\frac{\beta}{3}\right)\cdot cos\left (\beta\right) \\  &= &\frac{1}{2}+cos\left(\frac{\beta}{3}\right)\cdot cos\left (\frac{\beta}{3}+\frac{2\beta}{3} \right) \\  &= &\frac{1}{2}+cos\left(\frac{\beta}{3}\right)\cdot\left( cos\left(\frac{\beta}{3}\right) cos\left(\frac{2\beta}{3}\right)-sin\left(\frac{\beta}{3}\right) sin\left(\frac{2\beta}{3}\right)\right) \\  &= &\frac{1}{2}+\left[cos^2\left(\frac{\beta}{3}\right)\right] cos\left(\frac{2\beta}{3}\right)-\frac{1}{2}\cdot 2cos\left(\frac{\beta}{3}\right) sin\left(\frac{\beta}{3}\right) sin\left(\frac{2\beta}{3}\right) \\  &= &\frac{1}{2}+\left[\frac{1+cos\left(2\frac{\beta}{3}\right)}{2}\right] cos\left(\frac{2\beta}{3}\right)-\frac{1}{2}\cdot sin^2\left(\frac{2\beta}{3}\right) \\  &= &\frac{1}{2}+\frac{1}{2}cos\left(\frac{2\beta}{3}\right)+\frac{1}{2} cos^2\left(\frac{2\beta}{3}\right)-\frac{1}{2} \left( 1-cos^2\left(\frac{2\beta}{3}\right)\right) \\  &= & \frac{1}{2}cos\left(\frac{2\beta}{3}\right) + cos^2\left(\frac{2\beta}{3}\right) \\  &= & \left(\frac{1}{2}+cos\left(\frac{2\beta}{3}\right)\right)\cdot cos\left(\frac{2\beta}{3}\right) = x_5  \end{array}

Proving that the x expressions are equivalent.  Now for the ys

\displaystyle \begin{array}{lcl} y_4 &= & cos\left(\frac{\beta}{3}\right)\cdot sin\left(\beta\right) \\  &= & cos\left(\frac{\beta}{3}\right)\cdot sin\left(\frac{\beta}{3}+\frac{2\beta}{3} \right) \\  &= & cos\left(\frac{\beta}{3}\right)\cdot\left( sin\left(\frac{\beta}{3}\right) cos\left(\frac{2\beta}{3}\right)+cos\left(\frac{\beta}{3}\right) sin\left(\frac{2\beta}{3}\right)\right) \\  &= & \frac{1}{2}\cdot 2cos\left(\frac{\beta}{3}\right) sin\left(\frac{\beta}{3}\right) cos\left(\frac{2\beta}{3}\right)+\left[cos^2 \left(\frac{\beta}{3}\right)\right] sin\left(\frac{2\beta}{3}\right) \\  &= & \frac{1}{2}sin\left(2\frac{\beta}{3}\right) cos\left(\frac{2\beta}{3}\right)+\left[\frac{1+cos \left(2\frac{\beta}{3}\right)}{2}\right] sin\left(\frac{2\beta}{3}\right) \\  &= & \left(\frac{1}{2}+cos\left(\frac{2\beta}{3}\right)\right)\cdot sin\left (\frac{2\beta}{3}\right) = y_5  \end{array}

Therefore the graph of r=cos\left(\frac{\theta}{3}\right) is exactly the graph of r=\frac{1}{2}+cos\left(\theta\right) slid \frac{1}{2} unit left.  Nice.

If there are any students reading this, know that it took a few iterations to come up with the versions of the identities proved above.  Remember that published mathematics is almost always cleaner and more concise than the effort it took to create it.  One of the early steps I took used the substitution \gamma =\frac{\beta}{3} to clean up the appearance of the algebra.  In the final proof, I decided that the 2 extra lines of proof to substitute in and then back out were not needed.  I also meandered down a couple unnecessarily long paths that I was able to trim in the proof I presented above.

Despite these changes, my proof still feels cumbersome and inelegant to me.  From one perspective–Who cares?  I proved what I set out to prove.  On the other hand, I’d love to know if someone has a more elegant way to establish this connection.  There is always room to learn more.  Commentary welcome.

In the end, it’s nice to know these two polar curves are identical.  It pays to keep one’s eyes eternally open for unexpected connections!

Polar Graphing Surprise

Nurfatimah Merchant and I were playing around with polar graphs, trying to find something that would stretch students beyond simple circles and types of limacons while still being within the conceptual reach of those who had just been introduced to polar coordinates roughly two weeks earlier.

We remembered that Cartesian graphs of trigonometric functions are much more “interesting” with different center lines.  That is, the graph of y=cos(x)+3 is nothing more than a standard cosine graph oscillating around y=3.

Likewise, the graph of y=cos(x)+0.5x is a standard cosine graph oscillating around y=0.5x.

We teach polar graphing the same way.  To graph r=3+cos(2\theta ), we encourage our students to “read” the function as a cosine curve of period \pi oscillating around the polar function r=3.  Because of its period, this curve will complete a cycle in 0\le\theta\le\pi.  The graph begins this interval at \theta =0 (the positive x-axis) with a cosine graph 1 unit “above” r=3, moving to 1 unit “below” the “center line” at \theta =\frac{\pi}{2}, and returning to 1 unit above the center line at \theta =\pi.  This process repeats for \pi\le\theta\le 2\pi.

Our students graph polar curves far more confidently since we began using this approach (and a couple extensions on it) than those we taught earlier in our careers.  It has become a matter of understanding what functions do and how they interact with each other and almost nothing to do with memorizing particular curve types.

So, now that our students are confidently able to graph polar curves like r=3+cos(2\theta ), we wondered how we could challenge them a bit more.  Remembering variable center lines like the Cartesian y=cos(x)+0.5x, we wondered what a polar curve with a variable center line would look like.  Not knowing where to start, I proposed r=2+cos(\theta )+sin(\theta), thinking I could graph a period 2\pi sine curve around the limacon r=2+cos(\theta ).

There’s a lot going on here, but in its most simplified version, we thought we would get a curve on the center line at \theta =0, 1 unit above at \theta =\frac{\pi}{2}, on at \theta =\pi, 1 unit below at \theta =\frac{3\pi}{2}, and returning to its starting point at \theta =2\pi.  We had a very rough “by hand” sketch, and were quite surprised by the image we got when we turned to our grapher for confirmation.  The oscillation behavior we predicted was certainly there, but there was more!  What do you see in the graph of r=2+cos(\theta )+sin(\theta) below?

This looked to us like some version of a cardioid.  Given the symmetry of the axis intercepts, we suspected it was rotated \frac{\pi}{4} from the x-axis.  An initially x-axis symmetric polar curve rotated \frac{\pi}{4} would contain the term cos(\theta-\frac{\pi}{4}) which expands using a trig identity.

\begin{array}{ccc} cos(\theta-\frac{\pi}{4})&=&cos(\theta )cos(\frac{\pi}{4})+cos(\theta )cos(\frac{\pi}{4}) \\ &=&\frac{1}{\sqrt{2}}(cos(\theta )+sin(\theta )) \end{array}

Eureka!  This identity let us rewrite the original polar equation.

\begin{array}{ccc} r=2+cos(\theta )+sin(\theta )&=&2+\sqrt{2}\cdot\frac{1}{\sqrt{2}} (cos(\theta )+sin(\theta )) \\ &=&2+\sqrt{2}\cdot cos(\theta -\frac{\pi}{4}) \end{array}

And this last form says our original polar function is equivalent to r=2+\sqrt{2}\cdot cos(\theta -\frac{\pi}{4}), or a \frac{\pi}{4} rotated cosine curve of amplitude \sqrt{2} and period 2\pi oscillating around center line r=2.

This last image shows a cosine curve starting at \theta=\frac{\pi}{4} beginning \sqrt{2} above the center circle r=2, crossing the center circle \frac{\pi}{2} later at \theta=\frac{3\pi}{4}, dropping to \sqrt{2} below the center circle at \theta=\frac{5\pi}{4}, back to the center circle at \theta=\frac{7\pi}{4} before finally returning to the starting point at \theta=\frac{9\pi}{4}.  Because the radius is always positive, this also convinced us that this curve is actually a rotated limacon without a loop and not the cardioid that drove our initial investigation.

So, we thought we were departing into some new territory and found ourselves looking back at earlier work from a different angle.  What a nice surprise!

One more added observation:  We got a little lucky in guessing the angle of rotation, but even if it wasn’t known, it is always possible to compute an angle of rotation (or translation in Cartesian) for a sum of two sinusoids with identical periods.  This particular topic is covered in some texts, including Precalculus Transformed.