Skip to content

Instantly share code, notes, and snippets.

#lang racket
(require test-engine/racket-tests)
;; t \in SETerm
;; Terms as Symbolic expressions
(define (strue) '(true))
(define (sfalse) '(false))
(define (sif t1 t2 t3) `(if ,t1 ,t2 ,t3))
@rxg
rxg / globe.rkt
Last active October 31, 2018 11:39
What proportion of the earth's surface is covered in water? A Bayesian Inference Approach.
#lang racket
(require plot)
(require math/base)
(require math/number-theory)
(require math/distributions)
;; Integration, from https://github.com/mkierzenka/Racket_NumericalMethods
(require "Numerical_Integration.rkt")
;;
@rxg
rxg / urn.rkt
Last active November 12, 2018 00:01
Bayesian Inference example: Urn with Replacement
#lang racket
;; urn.rkt:
;; 5-ball urn statistical process:
;; - A Sampling Engine
;; - An Inference Engine
;; - Some Viz/Rendering tools (under construction)
(require math/distributions)
(require pict)
(require plot)