probability_monad

Examples

object Examples

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Examples
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait BloodGene extends AnyRef

    Bayesian networks

  2. case class BloodTrial(lisa: BloodType, homer: BloodType, marge: BloodType, selma: BloodType, jackie: BloodType, harry: BloodType) extends Product with Serializable

  3. sealed trait BloodType extends AnyRef

  4. sealed abstract class Child extends AnyRef

    Each family has children until it has a boy, and then stops.

  5. case class CoinTrial(haveFairCoin: Boolean, flips: List[Distribution.Coin]) extends Product with Serializable

    If you flip a coin and it comes up heads 10 times, what is the probability you have the fair coin?

  6. sealed abstract class Party extends AnyRef

    Simpson's Paradox

  7. sealed abstract class Patient extends AnyRef

    ELISA AIDS test.

  8. case class SmokingTrial(smoker: Boolean, tar: Boolean, cancer: Boolean) extends Product with Serializable

  9. sealed abstract class State extends AnyRef

  10. case class Trial(x: Boolean, y: Boolean, z: Boolean, w: Boolean, q: Boolean) extends Product with Serializable

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object A extends BloodType with Product with Serializable

  7. object AB extends BloodType with Product with Serializable

  8. object A_ extends BloodGene with Product with Serializable

  9. object B extends BloodType with Product with Serializable

  10. object B_ extends BloodGene with Product with Serializable

  11. implicit object BloodTypeOrd extends Ordering[BloodType]

  12. object Boy extends Child with Product with Serializable

  13. object Democrat extends Party with Product with Serializable

  14. object Girl extends Child with Product with Serializable

  15. object North extends State with Product with Serializable

  16. object O extends BloodType with Product with Serializable

  17. object O_ extends BloodGene with Product with Serializable

  18. def Q(y: Boolean): Distribution[Boolean]

  19. object Republican extends Party with Product with Serializable

  20. object Sick extends Patient with Product with Serializable

  21. object Smoking

  22. implicit val SmokingTrialOrdering: Ordering[SmokingTrial]

  23. object South extends State with Product with Serializable

  24. object Test

  25. def W(z: Boolean): Distribution[Boolean]

  26. object Well extends Patient with Product with Serializable

  27. def X: Distribution[Boolean]

    The probablistic graphical model

    The probablistic graphical model

    Y -> Q | v X -> Z -> W

  28. def Y: Distribution[Boolean]

  29. def Z(x: Boolean, y: Boolean): Distribution[Boolean]

  30. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  31. def attack(a: Int, d: Int): Distribution[Int]

    RISK

  32. def attacks(a: Int, d: Int): Distribution[(Int, Int)]

  33. def bayesianCoin(nflips: Int): Distribution[CoinTrial]

  34. def bayesianCoin2(nflips: Int): Distribution[Boolean]

  35. val bloodPrior: Distribution[(BloodGene, BloodGene)]

  36. val bloodType: Distribution[BloodTrial]

  37. def cancer(smoker: Boolean, tar: Boolean): Distribution[Boolean]

    Observed probabilities of getting cancer broken out by whether you smoke and whether you have tar in your lungs

  38. def centralLimitTheorem1(d: Distribution[Double], samples: Int): Unit

  39. def centralLimitTheorem2(d: Distribution[Boolean], samples: Int): Unit

  40. def centralLimitTheorem3(d1: Distribution[Double], d2: Distribution[Double], samples1: Int, samples2: Int): Unit

  41. def childFromParents(p1: (BloodGene, BloodGene), p2: (BloodGene, BloodGene)): Distribution[(BloodGene, BloodGene)]

  42. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def conquest(a: Int, ds: List[Int]): Distribution[Int]

  44. def dep[A, B](p: Distribution[A])(e1: (A) ⇒ B, e2: (A) ⇒ B)(implicit ord: Ordering[B]): Unit

  45. def dieSum(rolls: Int): Distribution[List[Int]]

    You roll a 6-sided die and keep a running sum.

    You roll a 6-sided die and keep a running sum. What is the probability the sum reaches exactly 30?

  46. def differenceOfMeans(d1: Distribution[Double], d2: Distribution[Double], n1: Int, n2: Int): Distribution[Double]

  47. def doPGM: Unit

  48. def doSmoking: Distribution[SmokingTrial]

  49. def elisa: Distribution[(Patient, Boolean)]

  50. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  51. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  52. def expectedFlips(flips: Int): Distribution[Int]

    How many times do you need to flip a fair coin to get n heads in a row?

  53. def family: Distribution[List[Product with Serializable with Child]]

  54. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  55. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  56. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  57. def hth: Distribution[Int]

    If you flip a coin repeatedly, which is more likely to occur first, HTH or HTT?

  58. def htt: Distribution[Int]

  59. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  60. val jones: Distribution[List[Product with Serializable with Child]]

    Mr.

    Mr. Jones has two children. The older child is a girl. What is the probability that both children are girls?

  61. val montyHall: Distribution[(Int, Int)]

    Monty Hall problem

  62. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  63. final def notify(): Unit

    Definition Classes
    AnyRef
  64. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  65. def pascal(depth: Int): Distribution[(Int, Int)]

    Pascal's triangle

  66. def pgm: Distribution[Trial]

  67. def population(families: Int): Distribution[Double]

  68. def queue(loadFactor: Double): Distribution[Int]

    A single bank teller can service a customer in 10 minutes.

    A single bank teller can service a customer in 10 minutes. If one customer comes in every 11 minutes on average, what is the expected length of the line?

  69. def randomWalk(target: Int, maxSteps: Int): Distribution[List[Int]]

    Random walk: starting at 0 and moving left or right with equal probability, how many steps do you expect to take before reaching 10?

  70. def runBank: Double

  71. def runBayesianCoin(heads: Int): Double

  72. def runBayesianCoin2: Unit

  73. def runBloodType: Double

  74. def runBoyGirl: Double

  75. def runCentralLimitTheorem1: Unit

  76. def runCentralLimitTheorem2: Unit

  77. def runCentralLimitTheorem3: Unit

  78. def runConquest: Unit

  79. def runDieSum: Double

  80. def runElisa: Double

  81. def runJones: Double

  82. def runKSTest: Unit

  83. def runMontyHall: Double

  84. def runPascal: Unit

  85. def runRandomWalk: Double

  86. def runSimpsonDem(): Double

  87. def runSimpsonRep(): Double

  88. def runSmith: Double

  89. def runSmoking: Unit

  90. def runTuesday: Double

  91. def runUnknownBiasedCoin: Unit

  92. def runUnknownBiasedCoin2: Unit

  93. def runWeather: Distribution[Boolean]

  94. def simpson(): Distribution[(Party, State, Boolean)]

  95. val smith: Distribution[List[Product with Serializable with Child]]

    Mr.

    Mr. Smith has two children. At least one of them is a boy. What is the probability that both children are boys?

  96. def smoker: Distribution[Boolean]

    Teasing apart correlation and causality.

    Teasing apart correlation and causality. From http://www.michaelnielsen.org/ddi/if-correlation-doesnt-imply-causation-then-what-does/

    First, observe the joint probability distribution of:

    • whether someone smokes
    • whether someone has tar in their lungs
    • whether someone gets cancer

    Encode this as a graphical model.

  97. def smoking: Distribution[SmokingTrial]

    This encodes the probability distribution of smoking and cancer.

    This encodes the probability distribution of smoking and cancer. We can use it to calculate p(cancer) and p(cancer|smoking).

  98. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  99. def tar(smoker: Boolean): Distribution[Boolean]

    95% of smokers have tar in their lungs 5% of nonsmokers have tar in their lungs

  100. def testBetaApproximatesNormal(a: Int, b: Int): Double

  101. def toString(): String

    Definition Classes
    AnyRef → Any
  102. val tuesday: Distribution[List[(Product with Serializable with Child, Int)]]

    Mr.

    Mr. Miller has two children. One of them is a boy born on Tuesday. What is the probability both children are boys?

  103. def typeFromGene(g: (BloodGene, BloodGene)): Distribution[BloodType]

  104. def unknownBiasedCoin(prior: Distribution[Double], nflips: Int, successes: Int): Distribution[Double]

    Given a biased coin with unknown bias distributed according to prior, after flipping nflips times and observing successes heads, what is the posterior distribution of the bias?

  105. def unknownBiasedCoin2(prior: Distribution[Double], nflips: Int, successes: Int): Distribution[Double]

  106. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. def weather: Distribution[(Boolean, Boolean)]

    Given a Markov model for the weather, if it is rainy on thursday, what was the likely weather on monday?

Inherited from AnyRef

Inherited from Any

Ungrouped