Object

probability_monad

Examples

Related Doc: package probability_monad

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait BloodGene extends AnyRef

    Permalink

    Bayesian networks

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

    Permalink
  3. sealed trait BloodType extends AnyRef

    Permalink
  4. sealed abstract class Child extends AnyRef

    Permalink

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

    Each family has children until it has a boy, and then stops. What is the expected fraction of girls in the population?

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

    Permalink

    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

    Permalink

    Simpson's Paradox

  7. sealed abstract class Patient extends AnyRef

    Permalink

    ELISA AIDS test.

    ELISA AIDS test. What is the probability you have the disease given a positive test result?

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

    Permalink
  9. sealed abstract class State extends AnyRef

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

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object A extends BloodType with Product with Serializable

    Permalink
  5. object AB extends BloodType with Product with Serializable

    Permalink
  6. object A_ extends BloodGene with Product with Serializable

    Permalink
  7. object B extends BloodType with Product with Serializable

    Permalink
  8. object B_ extends BloodGene with Product with Serializable

    Permalink
  9. implicit object BloodTypeOrd extends Ordering[BloodType]

    Permalink
  10. object Boy extends Child with Product with Serializable

    Permalink
  11. object Democrat extends Party with Product with Serializable

    Permalink
  12. object Girl extends Child with Product with Serializable

    Permalink
  13. object North extends State with Product with Serializable

    Permalink
  14. object O extends BloodType with Product with Serializable

    Permalink
  15. object O_ extends BloodGene with Product with Serializable

    Permalink
  16. def Q(y: Boolean): Distribution[Boolean]

    Permalink
  17. object Republican extends Party with Product with Serializable

    Permalink
  18. object Sick extends Patient with Product with Serializable

    Permalink
  19. object Smoking

    Permalink
  20. implicit val SmokingTrialOrdering: Ordering[SmokingTrial]

    Permalink
  21. object South extends State with Product with Serializable

    Permalink
  22. object Test

    Permalink
  23. def W(z: Boolean): Distribution[Boolean]

    Permalink
  24. object Well extends Patient with Product with Serializable

    Permalink
  25. def X: Distribution[Boolean]

    Permalink

    The probablistic graphical model

    The probablistic graphical model

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

  26. def Y: Distribution[Boolean]

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

    Permalink
  28. final def asInstanceOf[T0]: T0

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

    Permalink

    RISK

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

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

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

    Permalink
  33. val bloodPrior: Distribution[(BloodGene, BloodGene)]

    Permalink
  34. val bloodType: Distribution[BloodTrial]

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

    Permalink

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

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

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

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

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

    Permalink
  40. def clone(): AnyRef

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

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

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

    Permalink

    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?

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

    Permalink
  45. def doPGM: Unit

    Permalink
  46. def doSmoking: Distribution[SmokingTrial]

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

    Permalink
  48. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink

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

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

    Permalink
  52. def finalize(): Unit

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

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

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

    Permalink

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

  56. def htt: Distribution[Int]

    Permalink
  57. final def isInstanceOf[T0]: Boolean

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

    Permalink

    Mr.

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

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

    Permalink

    Monty Hall problem

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

    Permalink
    Definition Classes
    AnyRef
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

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

    Permalink

    Pascal's triangle

  64. def pgm: Distribution[Trial]

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

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

    Permalink

    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?

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

    Permalink

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

  68. def runBank: Double

    Permalink
  69. def runBayesianCoin(heads: Int): Double

    Permalink
  70. def runBayesianCoin2: Unit

    Permalink
  71. def runBloodType: Double

    Permalink
  72. def runBoyGirl: Double

    Permalink
  73. def runCentralLimitTheorem1: Unit

    Permalink
  74. def runCentralLimitTheorem2: Unit

    Permalink
  75. def runCentralLimitTheorem3: Unit

    Permalink
  76. def runConquest: Unit

    Permalink
  77. def runDieSum: Double

    Permalink
  78. def runElisa: Double

    Permalink
  79. def runJones: Double

    Permalink
  80. def runKSTest: Unit

    Permalink
  81. def runMontyHall: Double

    Permalink
  82. def runPascal: Unit

    Permalink
  83. def runRandomWalk: Double

    Permalink
  84. def runSimpsonDem(): Double

    Permalink
  85. def runSimpsonRep(): Double

    Permalink
  86. def runSmith: Double

    Permalink
  87. def runSmoking: Unit

    Permalink
  88. def runTuesday: Double

    Permalink
  89. def runUnknownBiasedCoin: Unit

    Permalink
  90. def runUnknownBiasedCoin2: Unit

    Permalink
  91. def runWeather: Distribution[Boolean]

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

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

    Permalink

    Mr.

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

  94. def smoker: Distribution[Boolean]

    Permalink

    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.

  95. def smoking: Distribution[SmokingTrial]

    Permalink

    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).

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

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

    Permalink

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

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

    Permalink
  99. def toString(): String

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

    Permalink

    Mr.

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

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

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

    Permalink

    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?

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

    Permalink
  104. final def wait(): Unit

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

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

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

    Permalink

    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