# Pymc-marketing: probability of being alive

I am transitioning from the Lifetimes Package to using pymc-marketing and enjoying using Bayesian Inference.
My question is regarding . Using my own data, I have made it through the “CLV Quickstart” up to the “Customer Probabilities Section.” The Lifetimes Package had a convenient function: model.conditional_probability_alive() where for each customer, the probability was calculated. Is there a similar function in pymc-marketing that accomplishes the same thing? The example in CLV Quickstart is for a single customer.

There is no plotting helper function but the model can calculate all the quantities you need for you, you just need to plot them yourself.

How did the lifetimes plot look like?

My understanding is that lifetimes’ `conditional_probability_alive()` method is not a plotting method, but simply returns the p(alive) for a customer with a given (e.g., historical) frequency and a given recency. For PyMC-Marketing’s `beta_geo` and `pareto_nbd` models, you can use the `expected_probability_alive()` method to calculate p(alive) for any given customer.

Appreciate the reply @ricardoV94. I was not concerned about plotting. LIfetimes has a function that calculates all the “probabilities of being alive” for the rfm_data in one function call. From the “CLV Quickstart” tutorial in the pymc-marketing, it appears that for each customer, one needs to create a dictionary etc., etc., Is it possible to make one clv function call and calculate all “probabilities of being alive” for all customers in the rfm dataset?

You should be able to pass entire vectors of customer IDs, frequencies, recencies, and `T`s. to `expected_probability_alive()`. Pretty sure there’s no need to do it customer by customer.

This is correct

Thanks @cluhman and @richardoV94. A follow-on on question regarding the `expected_probability_alive()` function. The API states:

“Posterior expected value of the probability of being alive at time T” If we want to calculate the probability of a customer being alive “today”, is T set to = 0?