# Probability of having 7 Girls of 8 Total Children

Here is a simplified example of calculating probability when there is a 50% chance of an outcome. This puts to good use the binomial distribution.

# chance of having at least 7 girls out of 8 children

cumulative probability function:
`dbinom(7, size=8, p=0.5)`
# 3.1%

# Probability of Web Clicks in a Day

Below is a simplified example using R in which you can apply a probability that a day has a certain # of visits. The web visits are approx normally distributed, and we want to know the probability of getting fewer than 50 visits/day.

```# web traffic for last seven days web_visits <- c(64, 34, 55, 47, 52, 59, 77) visits_day <- mean(web_visits) # mean = 55.4 sd_visits_day <- sd(web_visits) # standard_deviation = 13.5 goal_visits <- 50 #result pnorm(visits_day, goal_visits, sd=sd_visits_day, lower.tail=F) # .344 or 34.4% probability you'll have fewer than 50 web visits```

source: Statistical Inference, John Hopkins University/Coursera by Brian Caffo