Simulating a probability, use a random number?

In summary, the conversation revolves around simulating electric car journeys and the availability of charging points. The suggested method is to generate a random number between 0 and 1 and if it is less than 0.7, a charging point is available. The statistical logic behind this method is that, similar to the given example where 60% of the time someone charges an electric car, generating a random number and comparing it to the probability of availability is a good simulation of the actual event.
  • #1
bradyj7
122
0
Hello,

I looking for some advice for a simulation. I know that when an electric car arrives at a destination there is a 70% chance that a charging point will be available. I'm building a model that models electric car journeys. When a car arrives at a destination would I simulate a random number between 0 and 1 and if it is less than 0.7 then a charging post is available or if it is greater than 0.7 then a charging post is not available. Would that make sense? I would appreciate any suggestions or comments.

Thank you
 
Physics news on Phys.org
  • #2
Your description is exactly correct for the simulation.
 
  • #3
Hello MAthman,

Could you perhaps explain the statistical logic/theory for simulating an event like this?

In an other example, I know the probability that somebody will recharge an electric car is 60%. So if I generate a random number and it is less than 0.6 then the person plugs in and consumes electricity. I'm interested to know the statistical logic behind the method.

Thanks for your time

J
 
  • #4
60% of the time somebody charges an electric car.

60% of the time a (pseudo)-random number between 0 and 1 is less than 0.6.

So the latter is a good simulation of the former.
 
  • #5
for your question. Yes, using a random number between 0 and 1 to simulate a probability of a charging point being available makes sense. This approach is commonly used in simulations to represent real-life situations with uncertain outcomes. However, it is important to ensure that the probability distribution used for generating the random number accurately reflects the 70% chance of a charging point being available. Additionally, you may want to consider incorporating other factors such as time of day or location into your simulation to make it more realistic. Overall, using a random number to simulate a probability is a valid approach and can provide valuable insights in your electric car journey model.
 
Back
Top