YouTip LogoYouTip

R Func Choose

# Probability Calculation: Number of combinations of getting exactly 6 heads in 10 coin tosses\\ \\ print(paste("10 timesThere are ... ways to get exactly 6 heads in coin tosses",\\ \\ choose(10, 6), "ways"))\\ \\

RunlineThe output of the above code is:

\\ \\
C(5, k) k = 0 to 5: 1 5 10 10 5 1 "10 timesThere are 210 ways to get exactly 6 heads in coin tosses"
\\ Image 4: R Language Examples\\ R Language Examples\\ \\ \\

← R Func CorR Func Ceiling β†’