Find Single Threshold for the given data set .- need in 2 hrs

Job ID: 32877801

Budget: ₹600 – ₹1,500 INR

There is a order data - basically most of the data is booked and few deals/orders are cancelled . Need to know the threshold of cancellation ( basically something like - There is 70% probability of cancellation of the Deal/Order for >$500K is 80 days
There is 90% probability of cancellation of the Deal/Order for <$500K is 40days

This has to be done for each country

Need the script and logic - needs to be scalable for larger data sets and the logic must be either statistical or using machine learning .

Note - i dont need prediction - i just need the threshold value in days for probability of cancellation above a certain number of days . The output table in excel - needs to have the probability value aswell.
Related categories: Python Statistics Machine Learning (ML)