I want to construct a table of the terms

Binomial[n, i] t^i (1-t)^(n-i) 

where i goes from 0 to n.

I do not want to sum them. I want all the individual terms in a list. How can I do that?


closed as off-topic by Szabolcs, AccidentalFourierTransform, m_goldberg, MarcoB, Henrik Schumacher Dec 12 '18 at 16:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, AccidentalFourierTransform, m_goldberg, MarcoB, Henrik Schumacher
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ What have you tried? Why does the code that you show not work in a Table? n = 5; Table[Binomial[n, i]*t^i*(1 - t)^(n - i), {i, 0, n}] $\endgroup$ – Szabolcs Dec 11 '18 at 22:41
  • $\begingroup$ @Szaboics : it's not the code, basically I can only come up with the binomial coefficients, and I do not know how to combine and multiply the t and (1-t) terms $\endgroup$ – Chonglin Zhu Dec 11 '18 at 22:47
  • 2
    $\begingroup$ Apply[List, (x + y)^10 // Expand] /. {x -> t, y -> 1 - t} $\endgroup$ – Alan Dec 11 '18 at 23:27

As Szabolcs suggests, if you want a listing of all the terms, then you can use Table

n = 3; Table[Binomial[n, i] t^i (1 - t)^(n - i), {i, 0, n}]
{(1 - t)^3, 3 (1 - t)^2 t, 3 (1 - t) t^2, t^3}

or you can use Map (the symbols /@) to achieve the same thing:

n = 3; Binomial[n, #] t^# (1 - t)^(n - #) & /@ Range[0, n]

Not the answer you're looking for? Browse other questions tagged or ask your own question.