top | item 40990589

(no title)

PheonixPharts | 1 year ago

Essentially a funnel report where you want to know the total percent of the population that has reached a given path, but you only know the output probabilities of each step in the funnel (node). This is a fairly common situation.

As a simple example: you know after signup 20% of customers purchase, 80% don't, but what you want to trivially add in is the fact that of the users in a marketing campaign, 10% of them signed up, which means for the marketing funnel 2% purchase. Now consider that you have 20 or more such events in your funnel and you want to combine them all with out doing all the math by hand. Likewise you want to be able to add a newly discovered step in the funnel at will.

Using a topological sort you can take an arbitrary collection of nodes where each node only knows that probability the next nodes are, sort them and then compute the conditional probabilities for any user reaching a specific node fairly trivially, given the assumption that your funnel does represent a DAG.

If you don't perform the topological sort then you can't know you have calculated all the conditional probabilities for the upstream nodes, which makes the computation much more complicated. Topological sort is very useful any time you have an implied DAG and you don't want to have to worry about manually connecting the nodes in that DAG.

discuss

order

No comments yet.