Group Abstract Group Abstract

Message Boards Message Boards

1
|
534 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How to draw a probability tree diagram?

Posted 1 month ago
POSTED BY: Jim Clinton
2 Replies

One way is to use the paclet "TriesWithFrequencies":

PacletInstall["AntonAntonov/TriesWithFrequencies"];
Needs["AntonAntonov`TriesWithFrequencies`"];

combs = Flatten[Outer[List, {"On Time", "Late"}, {"On Time", "Late"}], 1];
seqs = Flatten[MapThread[Table, {combs, {7*7, 7*3, 3*7, 3*3}}], 1];

tr = TrieCreate[seqs];
TrieForm[tr]

TrieForm[TrieNodeProbabilities[tr]]

enter image description here

POSTED BY: Anton Antonov
Posted 1 month ago

The generation method is very useful—thank you so much! I now have a solution.

I have one more question: Is it possible to generate a tree diagram that exactly matches the one in the original question image?

POSTED BY: Jim Clinton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard