Skip to main content
Became Hot Network Question
edited tags
Link
cabohah
  • 24.2k
  • 3
  • 13
  • 32
Copied code here
Source Link
MS-SPO
  • 23.8k
  • 3
  • 23
  • 63

\documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \newcommand{\var}{\operatorname{Var}} \newcommand{\sd}{\operatorname{SD}} \newcommand{\bin}{\operatorname{Bin}} \newcommand{\geo}{\operatorname{Geo}} \newcommand{\bern}{\operatorname{Bern}} \newcommand{\nb}{\operatorname{NB}} \newcommand{\gam}{\operatorname{Gamma}} \newcommand{\Exp}{\operatorname{Exp}} \begin{document} \begingroup \centering \LARGE STM4PSD-T5\\ \LARGE Assignment 2 - Part 1\\[0.5em] \large \today\\[0.5em] \large Ace Taylor\par \large 22812081\par \endgroup \section{ Question 1A A fake, weighted coin has a 56 chance of flipping heads. The coin is flipped exactly 25 times. What is the expected number of tails, and what is the probability that at least 10 tails are flipped? } \section{Distribution needed: Binomial distribution Formula: $X \sim \bin(25,0.44)$ - this is because there's 0.56 chance of being heads therefore the probability of tails is 1 - probability of being heads or $1 - 0.56$ which comes to 0.44 $n = 25$ $p = 0.44$ $k = 10$ } \section{The expected number of tails = $E(X) = np$ $E(X) = 25 \times 0.44$ $E(X) = 11$ You can therefore expect 11 out of the 25 flips to land on tails} \section{Let a Successful attempt be when a tails is flipped Find: $P (X \ge 10)$ OR $1 - P(X < 10)$ Probability mass function: $P(X = k) = \binom{n}{k}p^k(1-p)^{n-k}$ Step 1. Calculate $P (X = K) for k = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9$ \[ P(X = k) = \binom{25}{k}0.44^k \times 0.56^{25 - k} \] \subsection{ For $k = 0$ $P(X = 0) = \binom{25}{0} \times 0.44 ^ 0 \times (1 - 0.44) ^ {25}$ $= \frac{25!}{25! \times 0!} \times 0.44 ^ 0 \times 0.56 ^ {25}$ $=1 \times 1 \times 0.56^{25}$ $= 0.000032$} \subsection{ for $k = 1$ $P(X = 1) = \binom{25}{1} \times 0.44 ^ 1 \times (1 - 0.44) ^ {25 - 1}$ $= \frac{25!}{24! \times 1!} \times 0.44^1 \times 0.56^{24}$ $25 \times 0.44 \times 0.000057$ $=0.000397$ } \subsection{ for $k = 2$ $P(X = 2) = \binom{25}{2} \times 0.44 ^ 2 \times (1 - 0.44) ^ {25 - 2}$ $\frac{25!}{23! \times 2!} \times 0.44 ^2 \times 0.56 ^ {23}$ $300 \times 0.1936 \times 0.000098 $ $=0.003037$ } \subsection{ for $k = 3$ $P(X = 3) = \binom{25}{3} \times 0.44 ^ 3 \times (1 - 0.44) ^ {25 - 3}$ $\frac{25!}{22! \times 3!} \times 0.44 ^ 3 \times 0.56 ^ {22}$ $2300 \times 0.085184 \times 0.00000288493$ $0.00056522642$ } } \subsection{ for $k = 4$ $P(X = 4) = \binom{25}{4} \times 0.44 ^ 4 \times (1 - 0.44) ^ {25 - 4}$ $\frac{25!}{21! \times 4!} \times 0.44 ^ 4 \times 0.56 ^ {21}$ $12650 \times 0.03748096 \times 0.00000515167$ $0.00244258264$ } \subsection{ for $k = 5$ $P(X = 5) = \binom{25}{5} \times 0.44 ^ 5 \times (1 - 0.44) ^ {25 - 5}$ $\frac{25!}{20! \times 5!} \times 0.44 ^ 5 \times 0.56 ^ {20}$ $53130 \times 0.0164916224 \times 0.00000919942$ $0.00806053086$ } \subsection{ For $k = 6$ $P(X = 6) = \binom{25}{6} \times 0.44 ^ 6 \times (1 - 0.44)^{25 - 6}$ $\frac{25!}{19! \times 6!} \times 0.44 ^ 6 \times 0.56 ^ {19}$ $177100 \times 0.00725631385 \times 0.00001642753$ $0.02111090681$ } \subsection{ for $K = 7$ $P(X = 7) = \binom{25}{7} \times 0.44 ^7 \times (1 - 0.44) ^ {25 - 7}$ $\frac{25!}{18! \times 7!} \times 0.44 ^ 7 \times 0.56 ^ {18}$ $480700 \times 0.00319277809 \times 0.00002933489$ $0.045022263$ } \end{document} 

\documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \newcommand{\var}{\operatorname{Var}} \newcommand{\sd}{\operatorname{SD}} \newcommand{\bin}{\operatorname{Bin}} \newcommand{\geo}{\operatorname{Geo}} \newcommand{\bern}{\operatorname{Bern}} \newcommand{\nb}{\operatorname{NB}} \newcommand{\gam}{\operatorname{Gamma}} \newcommand{\Exp}{\operatorname{Exp}} \begin{document} \begingroup \centering \LARGE STM4PSD-T5\\ \LARGE Assignment 2 - Part 1\\[0.5em] \large \today\\[0.5em] \large Ace Taylor\par \large 22812081\par \endgroup \section{ Question 1A A fake, weighted coin has a 56 chance of flipping heads. The coin is flipped exactly 25 times. What is the expected number of tails, and what is the probability that at least 10 tails are flipped? } \section{Distribution needed: Binomial distribution Formula: $X \sim \bin(25,0.44)$ - this is because there's 0.56 chance of being heads therefore the probability of tails is 1 - probability of being heads or $1 - 0.56$ which comes to 0.44 $n = 25$ $p = 0.44$ $k = 10$ } \section{The expected number of tails = $E(X) = np$ $E(X) = 25 \times 0.44$ $E(X) = 11$ You can therefore expect 11 out of the 25 flips to land on tails} \section{Let a Successful attempt be when a tails is flipped Find: $P (X \ge 10)$ OR $1 - P(X < 10)$ Probability mass function: $P(X = k) = \binom{n}{k}p^k(1-p)^{n-k}$ Step 1. Calculate $P (X = K) for k = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9$ \[ P(X = k) = \binom{25}{k}0.44^k \times 0.56^{25 - k} \] \subsection{ For $k = 0$ $P(X = 0) = \binom{25}{0} \times 0.44 ^ 0 \times (1 - 0.44) ^ {25}$ $= \frac{25!}{25! \times 0!} \times 0.44 ^ 0 \times 0.56 ^ {25}$ $=1 \times 1 \times 0.56^{25}$ $= 0.000032$} \subsection{ for $k = 1$ $P(X = 1) = \binom{25}{1} \times 0.44 ^ 1 \times (1 - 0.44) ^ {25 - 1}$ $= \frac{25!}{24! \times 1!} \times 0.44^1 \times 0.56^{24}$ $25 \times 0.44 \times 0.000057$ $=0.000397$ } \subsection{ for $k = 2$ $P(X = 2) = \binom{25}{2} \times 0.44 ^ 2 \times (1 - 0.44) ^ {25 - 2}$ $\frac{25!}{23! \times 2!} \times 0.44 ^2 \times 0.56 ^ {23}$ $300 \times 0.1936 \times 0.000098 $ $=0.003037$ } \subsection{ for $k = 3$ $P(X = 3) = \binom{25}{3} \times 0.44 ^ 3 \times (1 - 0.44) ^ {25 - 3}$ $\frac{25!}{22! \times 3!} \times 0.44 ^ 3 \times 0.56 ^ {22}$ $2300 \times 0.085184 \times 0.00000288493$ $0.00056522642$ } } \subsection{ for $k = 4$ $P(X = 4) = \binom{25}{4} \times 0.44 ^ 4 \times (1 - 0.44) ^ {25 - 4}$ $\frac{25!}{21! \times 4!} \times 0.44 ^ 4 \times 0.56 ^ {21}$ $12650 \times 0.03748096 \times 0.00000515167$ $0.00244258264$ } \subsection{ for $k = 5$ $P(X = 5) = \binom{25}{5} \times 0.44 ^ 5 \times (1 - 0.44) ^ {25 - 5}$ $\frac{25!}{20! \times 5!} \times 0.44 ^ 5 \times 0.56 ^ {20}$ $53130 \times 0.0164916224 \times 0.00000919942$ $0.00806053086$ } \subsection{ For $k = 6$ $P(X = 6) = \binom{25}{6} \times 0.44 ^ 6 \times (1 - 0.44)^{25 - 6}$ $\frac{25!}{19! \times 6!} \times 0.44 ^ 6 \times 0.56 ^ {19}$ $177100 \times 0.00725631385 \times 0.00001642753$ $0.02111090681$ } \subsection{ for $K = 7$ $P(X = 7) = \binom{25}{7} \times 0.44 ^7 \times (1 - 0.44) ^ {25 - 7}$ $\frac{25!}{18! \times 7!} \times 0.44 ^ 7 \times 0.56 ^ {18}$ $480700 \times 0.00319277809 \times 0.00002933489$ $0.045022263$ } \end{document} 
Source Link
Ace
  • 33
  • 2

PDF Outputting Duplicating Subsections

I'm using Oveleaf and LaTeX for the first time at the moment for a uni assignment.

As you can see from my code I have each subsection in there once but when I look at the PDF output the subsections are duplicated and I have no idea why? I've tried googling but have had no success in figuring out why :/

Does anyone have any ideas of what I"m doing wrong?