What is the probability a person sees a tree by looking out of the window? I'm familiar with the basic probability rules which problems come in the form of:

*

*What is the probability of getting a head next by tossing a coin? 0.5

*What is the probability of getting a 3 if a number is chosen uniformly at random from the set {1, 2, 3, 4}? 0.25

How more complicated forms of questions are calculated? for example: what is the probability a person sees a tree by looking out of the window given there are 2 trees that could be seen from that window?
There are many things to consider:

*

*The person's eye vision.

*Time of the day (and how many light bulbs are around in case it's after sunset)

*The direction at which he looks.

*How tall are the trees?

*Can the person pass a drug test at the given moment?

*Does he have a history of delusions?

And the list goes on which may contain infinite possibilities leading to seeing / not seeing a tree. Given we don't have a frequency of people who saw a tree by looking from that very same window, how to calculate the probability with any degrees of accuracy? How confident are we given that we are 100% confident the probability of getting 3 out of {1, 2, 3, 4} is 0.25? What if we don't have anything given in which case the question is the same as the title?

This is what supervised learn does, particularly so-called “classification” models (most of which make probability predictions, but “classification” is all but a euphemism for predicting the probability of a discrete outcome).
Consider a deck of cards. I draw a card and ask you to guess the card without showing it to you. You have a $1/52$ probability of guessing the right card, so little less than $2\%$ chance. If I then show you that that the card is red, you’ve ruled out half of the cards and know that it must be a diamond or a heart. Your probability of guessing the right card increased from $1/52$ when you were complexly ignorant about the card I drew to $1/26$ when I gave you some information about the card.
In machine learning or predictive modeling, those details about the cards are called features or predictors (probability some other terms, too).
How to use the available features and synthesize new ones from existing features is the special sauce of accurate predictive models.
If your example, in the absence of much information about the viewer, you might think there is a low chance of her seeing a tree. However, if you know that she looked in the direction of a tree in the middle of the daytime when she should be able to see, perhaps you would think there is a high probability of her seeing a tree. Conversely, if you knew that she looked at night without the help of a flashlight and on an overcast night that even had a new moon (so no moonlight), you might expect there to be a particularly low probability of her seeing a tree.
How to model something like this is an open question that machine learning and predictive modeling practitioners tackle every day.
