MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Symbolic Formula

On Jan 8, 10:17 am, John <j... at> wrote:
> Mathematica 6, Windows XP
> The left-hand-side of the equality appearing below is shorthand
> notation for the the probability that would be computed, if the right
> hand side was evaluated for specified values of n and p. The
> appearance of  the equality is suitable for displaying in class on a
> projector.
>  Grid[{{"P(X=j|n,p)=", Binomial[n, j] // TraditionalForm ,
>    "\!\(\*SuperscriptBox[\"p\", \
> \"j\"]\)(1-p\!\(\*SuperscriptBox[\")\",
> RowBox[{\"n\", \"-\", \"j\"}]]\)"}}, Frame -> True,
>  Spacings -> {.5, 2},
>  ItemStyle -> Directive[FontFamily -> "Tahoma", Bold, 24]]
> The cumulative distribution function includes a summation sign on the
> right-hand-side of the equality, but the appearance of my attempts to
> insert the summation sign are not acceptable.
> Appearance matters because the equality is displayed on a projector
> and viewed by students in class.
> John


You could use:

CellPrint@TextCell["P(X=j|n,p)  =  "
    HoldForm[Sum[Binomial[n, i]*p^i*(1 - p)^(n - i), {i, 0, j}]]],
  ShowStringCharacters -> False, CellFrame -> True, FontSize -> 24,
  FontFamily -> "Tahoma", FontWeight -> Bold]

Note that:
1. HoldForm prevents the evaluation of your Sum
2. ShowStringCharacters prevents the display of the apostrophes

The above expression has also the advantage that you do not have to
use boxes.
And the created (Text) cell is editable (e.g. with the Palette).

I hope this helps.

Best Regards
Norbert Marxer

  • Prev by Date: Re: Manipulating FinancialData[]
  • Next by Date: Re: NonlinearModelFit and ParameterTable
  • Previous by thread: Re: Symbolic Formula
  • Next by thread: Re: Re: Symbolic Formula