# What is means of 50% of the time

so " `Math.random() >= .5` , Statistically speaking, this expression will return `true` 50% of the time, and `false` the other 50%."

The question is, how do we get the value of the time?

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0`.

Challenge: Render Conditionally from Props

1 Like

Hey @aldhaneka. I think you misread that paragraph. It says that 50% chances are that this expression will return `true` and 50% chances are that this expression will return `false`. The time in that paragraph is not said as a unit. This reply may sound odd, but I donâ€™t know how to say this!

1 Like

Well, when you think about it, itâ€™s actually an intuitive way of looking at it.
Since Math.random() gives you values is between 0(inclusive) and 1(exclusive) randomly. The value larger or equal to .5 accounts for half of the chances of all tries, so itâ€™s ok to say half of the time (of all tries). And it sounds more friendly, to human brains.

And this is the way (or one of the way? Iâ€™m not sure) of how we control the possibility of specific events happening.

1 Like

Right, like paulsontech is saying, itâ€™s just how we say it in English. (Iâ€™m sorry, aldhaneka, Iâ€™m inferring that youâ€™re not a native English speaker.) paulsontech explained it, but let me see if I can extend on that.

Right, â€śtimeâ€ť in this sense does not refer to â€śclock timeâ€ť but to an â€śoccurrenceâ€ť. It would be like if I said to my wife, â€śDo you remember the time we went to that restaurant?â€ť Iâ€™m asking her to remember the â€śeventâ€ť or â€śoccurrenceâ€ť, not what time it said on her watch.

So, something like:

Statistically speaking, this expression will return `true` 50% of the time â€¦

is meant to be read as:

Statistically speaking, this expression will return `true` 50% of the occurrences â€¦

or

Statistically speaking, this expression will return `true` 50% of the instances â€¦

or

Statistically speaking, this expression will return `true` 50% of the events â€¦

Another way to say it might have been:

Statistically speaking, this expression has a 50% probability of evaluating to `true`.

2 Likes

oh, is it will return true if your wife says an occurrence that is a 50% (50% until 100%) chance of the event actually happening?

Think of it this way, if I say it rains 50% of the time, that means that there is a 50% chance of rain. It is an odd use of the word â€śtimeâ€ť, but languages are like that.