Search

  • Biological Childbirth is immoral/hell

    Man must be social to grow. A mother chooses childbearing by having sex. Children are f@#k trophies, but if this world is just and right it doesn't matter if you didn't choose existence, your parents, or being born. "It is not for us to choose our trials, but for us to make something of ourselves"
  • The Road to 2020 - American Elections

    Fishfry, I think one of the reasons is shown in the following graph very clearly:

    960x0.jpg?fit=scale

    So how can the health care cost be half of what you pay in many countries and still have the ability to afford universal health care?

    Now I don't believe that public sector health care is particularly efficient, yet think about it. You pay twice and even more than twice than others. And in the end, the public heath statistics are dismal. I would say the US system a racket.

    I do understand and it's a real possibility, if your argument is that the US would totally f*#k up an universal health care system if the corrupt system was put to make it...
  • Mathematical Conundrum or Not? Number Six

    I changed the code a bit to come up with another visual demonstration. I changed the two.envelopes function to just output A and then copied it to another function called two.envelopes.s which outputs B.

    What this simulates is if you never switch then you walking away with A and if you always switch then you walk away with B. I used a normal distribution for this example but honestly you can do the same thing for any distribution since the content of A and B are determined by the same chance event.

    The point of this demonstration is to show that the possible distribution of A is the same as the possible distribution of B so I have included some graphs that can be visually compared, and I use a Kolmogorov-Smirnov Tests, also known as the K-S test. This is a non-parametric test, and if you want the details on how it works just Google it, the concept is actually really simple.

    The K-S test compares two distributions to see if they match.

    The hypotheses works like this: Let F(x) and S(x) designate some unknown distribution functions of the X's and Y's respectively.

    Then our following two-sided null hypothesis is: F(x) = S(x) for all of x
    Then our alternative hypothesis is: F(x) does not equal S(x) for at least one value of x

    If you have never seen a classical statistical hypotheses test, the short and sweet of it, is if we get a low p-value we consider this evidence against the null hypothesis. The lower the p-value the greater the evidence. P-values range from 0 to 1. They are the probability of a ratio as extreme or more extreme than the observed given the null is true. Note they are not evidence for the null, failing to reject does not prove a null. The null is just that annoying guy that always demands you prove everything you say, but it is the alternative hypothesis that we are really testing for.


    Here is the code:

    two.envelopes <- function(){
    x <- (rnorm(1))
    x <- (abs(as.numeric(format(round(x, 3)))))*10 
    #randomly selects a number 
    #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. 
    p <- c(x,2*x)
    A <- sample(p, 1, replace=F)
    #creates a vector with x and 2x then randomly selects one for A.
    if (A == x) {
    B <- 2*x
    } else {
    (B <- x)
    }
    return(c(A))
    }
    #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x
    g <- replicate(10000, two.envelopes())
    
    
    two.envelopes.s <- function(){
    x <- (rnorm(1))
    x <- (abs(as.numeric(format(round(x, 3)))))*10 
    #randomly selects a number 
    #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. 
    p <- c(x,2*x)
    A <- sample(p, 1, replace=F)
    #creates a vector with x and 2x then randomly selects one for A.
    if (A == x) {
    B <- 2*x
    } else {
    (B <- x)
    }
    return(c(B))
    }
    #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x
    g.s <- replicate(10000, two.envelopes())
    
    library(ggplot2)
    plot(g)
    plot(g.s)
    ggplot() + aes(g)+ geom_histogram(binwidth=10, colour="black", fill="white")
    
    ggplot() + aes(g.s)+ geom_histogram(binwidth=10, colour="black", fill="white")
    
    ks.test(g, g.s)
    
    #K-S test results
    
    p-value will be approximate in the presence of ties
    	Two-sample Kolmogorov-Smirnov test
    
    data:  g and g.s
    D = 0.0077, p-value = 0.9283
    alternative hypothesis: two-sided
    
    

    So we see with a D test statistics of 0.0077 and a 0.92 p-value we don't have strong enough evidence to support the alternative hypothesis that the two distributions are reasonably different.

    Of course this was an expected outcome and would remain true no matter how X was selected, as once X is selected its distribution in the envelopes is now something separate which depends on how the envelopes themselves are selected.

    If you don't like the K-S test here are some plots that allow you to view the similarities:

    There are scatter plots of each distribution and histograms of each. They will look very similar.

    Scatter Plots:

    https://ibb.co/ksr0P8

    https://ibb.co/bW6gxT

    Histograms:

    https://ibb.co/c9w3Bo

    https://ibb.co/h30248

Welcome to The Philosophy Forum!

Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.