Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Symbolic Formula

3 views
Skip to first unread message

John

unread,
Jan 8, 2010, 4:17:24 AM1/8/10
to
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

John

unread,
Jan 10, 2010, 3:28:08 AM1/10/10
to

Addendum:

Step 1:

TraditionalForm /@ {Sum[( {
{n},
{i}
} ), {i, 0, j}]}

Step 2

Manually delete the curly brackets

Step 3

Editing after step 3 produced the following:

\!\(\*
TagBox[
FormBox[
RowBox[{
UnderoverscriptBox["\[Sum]",
RowBox[{"i", "=", "0"}], "j"],
RowBox[{"(", "\[NoBreak]", GridBox[{
{"n"},
{"i"}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}],
TraditionalForm],
TraditionalForm,
Editable->True]\) p^i (1 - p)^(n - i)

The formula on the screen is correct, but it is too small to be viewed
on a projector. Doubling the size works, but if possible, I would
prefer to change the font of the text in the formula.

John


magma

unread,
Jan 10, 2010, 3:29:01 AM1/10/10
to

Perhaps something like this? (mathematically it is not correct, I just
show how to print the summation)

Grid[{{"P(X=j|n,p)=", Style["\!\(\*UnderoverscriptBox[\"\[Sum]\",
RowBox[{\"j\", \"=\", \"1\"}], \"n\"]\)", Italic, 32], Binomial[n, j],
p^j (1 - p)^(n - j)}}, Frame -> True, Spacings -> {.5, 2},
ItemStyle ->
Directive[FontFamily -> "Tahoma", Bold, 24]] // TraditionalForm


John

unread,
Jan 10, 2010, 3:31:04 AM1/10/10
to

Addendum:

I started with the following:

TraditionalForm /@ {Sum[( {
{n},
{i}
} ), {i, 0, j}]}

Manually removed the curly brackets from previous output, and used the
palette to add the remainder of the formula.

\!\(\*
TagBox[
FormBox[
RowBox[{
UnderoverscriptBox["\[Sum]",
RowBox[{"i", "=", "0"}], "j"],
RowBox[{"(", "\[NoBreak]", GridBox[{
{"n"},
{"i"}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}],
TraditionalForm],
TraditionalForm,
Editable->True]\) p^i (1 - p)^(n - i)

What appears above is exactly what I want except that it is too small
to be viewed on a projector. How do I make it bigger?

John

Norbert Marxer

unread,
Jan 11, 2010, 5:28:41 AM1/11/10
to

Hello

You could use:

CellPrint@TextCell["P(X=j|n,p) = "
TraditionalForm[
HoldForm[Sum[Binomial[n, i]*p^i*(1 - p)^(n - i), {i, 0, j}]]],
"Text",
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

David Park

unread,
Jan 11, 2010, 5:30:42 AM1/11/10
to
Would the following work for you?

mysum[i_, n_, p_] :=
Interpretation[Row[{"P(", X == i, "|", n, ", ", p, "))"}],
mysum[i, n, p]]

mysum[i, n,
p] == (Sum[Binomial[n, i] p^i (1 - p)^(n - i), {i, 0, j}] //
HoldForm) // Magnify[#, 2.5] & // TraditionalForm

or


Style[mysum[i, n,
p] == (Sum[Binomial[n, i] p^i (1 - p)^(n - i), {i, 0, j}] //
HoldForm), FontSize -> 35,
FontFamily -> "Helvetica"] // TraditionalForm


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

From: John [mailto:jw...@lehigh.edu]

Addendum:

Step 1:

TraditionalForm /@ {Sum[( {
{n},
{i}
} ), {i, 0, j}]}

Step 2

Manually delete the curly brackets

Step 3

Editing after step 3 produced the following:

\!\(\*


TagBox[
FormBox[
RowBox[{
UnderoverscriptBox["\[Sum]",
RowBox[{"i", "=", "0"}], "j"],
RowBox[{"(", "\[NoBreak]", GridBox[{
{"n"},
{"i"}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}],
TraditionalForm],
TraditionalForm,
Editable->True]\) p^i (1 - p)^(n - i)

The formula on the screen is correct, but it is too small to be viewed

0 new messages