A list of puns related to "Sampling With Replacement"
I have a bag with 90 chocolates and 10 mints. If I draw a chocolate I eat it. If I draw a mint I put it back in the bag and draw again and eat whatever I draw on the next draw no matter what. Whats the probability the last item I daw is a mint?
I tried writing a simulation in python but am having difficulty as I need to randomly sample from a list with out replacement and then place the object back in the list if its a mint. Sampling without replacement in python is weird enough.
Wondering if there is an analytical way of doing this, or a better way to simulate?
I'm having a statistics problem that I can't seem to figure out. I'm not a statistician and pretty much just know the basics here. The actual problem is a bit more complicated than the example I'm about to present, but the principle is the same:
Setup
Imagine a room with you and 4 other people.
In this room, there are three hats.
You and all the other people write your name on tiny pieces of paper.
You then each place a different number of pieces of paper into each hat:
Person 1 | Person 2 | Person 3 | Person 4 (You) | Person 5 |
---|---|---|---|---|
Hat 1 (60 pieces) | 18 pieces | 15 pieces | 12 pieces | 9 pieces |
Hat 2 (50 pieces) | 16 pieces | 13 pieces | 10 pieces | 7 pieces |
Hat 3 (40 pieces) | 14 pieces | 11 pieces | 8 pieces | 5 pieces |
To put that into percentages, this is how much of the hat each person takes up:
Person 1 | Person 2 | Person 3 | Person 4 (You) | Person 5 |
---|---|---|---|---|
Hat 1 | 30% | 25% | 20% | 15% |
Hat 2 | 32% | 26% | 20% | 14% |
Hat 3 | 35% | 27.5% | 20% | 12.5% |
Sampling
First, a name is pulled out of Hat 1 and is set aside in a cup. Then, all papers with that person's name are removed from Hat 2 and Hat 3.
Then, a name is pulled from Hat 2 and is put in the cup. Then, all papers with that person's name are removed from Hat 3.
Lastly, a name is pulled from Hat 3 and is put in the cup.
The Problem
Q. What is the total percent chance that you (Person 4) will have your name in the cup after this sampling?
My Logic Feel free to skip this if you aren't interested in hearing why I'm confused lol
Unfortunately, I can't wrap my head around how the variable odds of the second and third draws affect your total chances of "winning" and getting your name pulled.
In a "best case scenario" where Hat 1 is won by Person 1 and Hat 2 is won by person 2, you (Person 4) have a ~21.59% chance to win Hat 2 and a ~33.33% to win Hat 3.
So, I'd guess that the formula for this is the following (even though it's not possible to win two hats, this is the only formula I can think of for this):
P(winning) = P(winning Hat 1) + P(winning Hat 2) + P(winning Hat 3) - P(winning Hat 1 AND Hat 2) - P(winning Hat 1 AND Hat 3) - P(winning Hat 2 AND Hat 3) + P(winning Hat 1 AND Hat 2 AND Hat 3)
P(winning) = 15% + 21.59% + 33.33% - 3.24% - 5% - 7.2% + 1.08%
P(winning) = ~55.56%
#BUT
There is als
... keep reading on reddit β‘Way back, I used a program called Audiograbber for ripping music from CDs. It came in two version; free and paid. The free version had a limitation: it would only allow half the tracks to be copied, and would select these tracks at random. Each time the disc was inserted it would select a new selection of half the tracks. To copy the full CD would need each track to have been selected at least once, and this could take many rounds. I've always wondered how I could work out the probability of the number of turns needed to get all the tracks. (I think there was a bias towards odd-numbered tracks, but for this assume all tracks have a equal chance of being selected each turn)
-you could get lucky and have all the tracks that were not in the first round selected in the second round. -alternatively, it is very unlikely but not impossible that after 100 rounds that they all have not been selected at least once.
different but similar scenario
* roll a d6 dice
* roll again
* how many rolls until all 6 numbers have come up at least once?
at its simplest you could consider a coin toss; how to figure the probability that it will take 'x' tosses to get at least one head and one tail. I think for x=2 it would be 0.5, then 0.25 for x=3 and so on (since the probability of 2 heads or 2 tails for the first two tosses would be 0.5, the chances that the third toss would be different would be 0.5, giving a combined probability of 0.5*0.5 = 0.25 for exactly three tosses).
Hey synheads! I was just wondering, do you think an Octatrack would cover me for intense sampling of hardware and vinyl records? I currently use the sampler in Ableton but I don't find it very expressive. I'd be selling an Ableton Push to fund an Octatrack purchase. Is this a good move? I know it's very subjective but I'm hoping for some sound wisdom from grand masters. Cheers!
I often use M-:
(eval-expression
) to check or set variable values or as a calculator. But if I try to use completion there, I always end up with the *Completions*
buffer. Is there any nice completion replacement package which deals with this use case? I think itβs a matter of supporting completion-at-point
inside the minibuffer.
So far, I found that:
For those who don't mind reading in depth, this is a better read: ProFiber Reddit
TL;DR version below.
ProFiber is a meal replacement designed for those who are afflicted with several risk factors for heart disease. The main three are high blood sugar, high cholesterol, and a larger waistline. Of all meals and meal replacements, this is the highest in fiber, coming in at nearly 17grams. With an additional 21grams of protein, this keeps you full.
Pretty transparent graph showing our product
I, along with my partner, Dr. Silverman, have been working on this in Sarasota, FL for 2.5 years, with it being on market for just under a year. We wanted to test viability in an area that fit our target demographic, and now with a good retention and success rate, we can say it is viable.
The product itself comes in one flavor, original. We named it such because we honestly get mixed opinions as to what it tastes like nearly every time. A normal bag is $50 plus 10$ flat shipping - it's heavy at 15 servings. BUT for a limited time we are offering samples (only 100!) though it doesn't quite fit the financials.
I know you all are a well-informed group and wanted to get your opinion on it, so I've set up a sample product where you can get it for 1 cent plus $2 shipping right here. <-- THERE
In the document up top, I list who shouldn't try it. Don't want any false hope!
This is a really high quality product, with a great purpose, so I hope you guys are receptive. Would also love to answer any and all questions.
-Antonio
The ballasts don't seem to properly fit into the headlight housing and the holes for the screws don't align at all. does anyone know any ways I can make them fit, or are there different ballasts that I can use?
I am implementing the paper "Not All Samples Are Created Equal: Deep Learning with Importance Sampling" in PyTorch (arxiv, Keras implementation).
The paper
The idea of the paper is as follow:
The problem
The paper is very well written in general, and a full implementation is provided. I used to think this was the clearest paper ever, before I started working on a PyTorch implementation.
Now I realise that:
How their upper bound works
So, the core of the paper appears on page 3-4 in this version.
They show that the l2-norm of the gradient (eq 16) is bounded by eq 19. I don't understand intuitively what the quantities expressed in eq14 and eq15 are, but I trust them that the inequality stands.
Then, they simplify this inequality into eq 20, with the following justification:
> Various weight initialization (Glorot & Bengio, 2010) and activation normalization techniques (Ioffe & Szegedy, 2015; Ba et al., 2016) uniformise the activations across samples. As a result, the variation of the gradient norm is mostly captured by the gradient of the loss function with respect to the pre-activation outputs of the last layer of our neural network.
So if I understand correctly, because of nice initialisation methods, plus batch-norm, layer-norm etc, we can assume that the norm of the gradient will be roughly the same at each layer.
(I'm not 100% sure my understanding is correct. Another interpretation of the part in bold would be that the norm of the gradient will be much larger at the last layer than at an
... keep reading on reddit β‘I use ML algorithms, and have some stats knowledge, but didn't do a stats degree. I hadn't ever worried too much about the use of bagging in random forests, but I did today, and I can't work out why it matters if we sample with replacement or not. I am not that knowledgeable about bootstrapping - I know the basics, but haven't studied the topic in detail.
Let's take two scenarios. I have a data set with n observations, and I either
- build a standard random forest, using bagging to randomise the training data used in each tree. To keep the examples the same, lets say we opt to create training data sets that contains 60% of the total number of observations in my original data set, but as we're bagging, these are sampled with replacement
- build a random forest, where rather than bagging, I sample 60% of my data for each tree without replacement
And we keep everything else the same.
Does the second scenario result in a worse result? And if so, is this universally true, or would it apply to certain distributions of data? Does sample size matter? What is it about bootstrapping that makes this true?
My naive assumption is that whilst I understand that sampling with replacement will lead to different training data sets because there will be duplicates, it doesn't follow that this leads to a better random forest.
Hi everyone !
I'm doing some data collection with LabView and I have a hard time understanding how DAQmx works.
I'm collecting 6000 data at 100 Hz using continuous collecting (and yes I will not changes it to finit for some more complicated reasons). I'm reading 4 data at the time, will do some calculations and will be sending the results to separate loops (producer consumer model) to log is and display it on the front panel.
Here is an example
https://preview.redd.it/us67eo03bjm71.png?width=1363&format=png&auto=webp&s=f28bcbb2f936fbd1ad482cbfe5787392266fc220
I know that there can be some delay with the front panel update or logging. I don't care with that, it's minimal and working well with notification and queue.
My questions are the following:
Thanks everyone for your time !
Natutulog pa ako noong tumawag ang kapatid ko.
[I was still sleeping when my sibling called/telephoned me.]
Can the same meaning be expressed by replacing the noong with kapag, kung or nang thus:
Natutulog pa ako kapag tumawag ang kapatid ko.
Natutulog pa ako kung tumawag ang kapatid ko.
Natutulog pa ako nang tumawag ang kapatid ko.
With respect to the use of pa, is it used to enhance the vividness of the action of sleeping or does it serve another function such as a contradistinction to the normal situation when the writer's slbling calls?
Hi again /r/Vive!
In lieu of a lot of recent confusion (and frustration from devs), I made a video that runs through how I super sample with the recent update in Steam VR's settings:
https://youtu.be/HhLfU8OhI4E
The video explains what super sampling is, how to super sample, and how to monitor performance ensuring you are super sampling correctly based on your specific PC's setup.
If you want to skip the 'understanding' part and just hit the settings part:
https://youtu.be/HhLfU8OhI4E?t=4m55s
If you wanna skip the vid altogether:
Essentially:
Super sampling in Steam VR (has benefit of per application super sampling):
On desktop go to Steam VR settings
On the Application tab pick an app from the drop down list and the slider will affect the super sampling of just that selected app
On the Video tab tick the 'Manual Override' box and this slider will affect the super sampling of every game/app running through Steam VR
My advice:
Super sampling in Advanced Settings (has benefit of changing settings from in VR):
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.