This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

## 2018-08-22

## Channels

- # announcements (3)
- # beginners (22)
- # braveandtrue (6)
- # calva (2)
- # cider (85)
- # cljdoc (1)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (70)
- # clojure-italy (9)
- # clojure-spec (1)
- # clojure-uk (144)
- # clojure-ukraine (6)
- # clojurescript (109)
- # cursive (59)
- # data-science (15)
- # datomic (40)
- # emacs (8)
- # fulcro (64)
- # funcool (8)
- # graphql (8)
- # hispano (3)
- # hoplon (7)
- # jobs-discuss (29)
- # leiningen (3)
- # luminus (2)
- # off-topic (13)
- # onyx (9)
- # parinfer (49)
- # pedestal (2)
- # portkey (8)
- # re-frame (10)
- # reagent (33)
- # reitit (13)
- # ring (2)
- # ring-swagger (16)
- # shadow-cljs (193)
- # spacemacs (1)
- # sql (19)
- # tools-deps (19)

The vector doesn’t actually need to be sorted. If body part 1 takes up 10 “units”, and body part 2 takes up 5, body part 1 is going to have twice as many opportunities to get hit as body part 2, just because it’s twice as big

It’s the relative size that counts.

Hmm, I’m still not getting why this wouldn’t happen:

```
[1 1 1 1 1 1 1 2 2 3 3 3 3 3 3 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 ]
[= = = = = = = = = = = = = = = = = = = ^ ] ;; target
```

In the above, we get to a smaller body part, because of the way the vect was orderedYup, in the above list, you have 3 chances out of 30 to hit body part 4, 2 chances out of 30 to hit body part 2, and so on. So sometimes you'll hit the smaller body part. The target is random, so you'll randomly hit big body parts some times, and small body parts other times, but as you keep hitting different parts, you'll notice you hit the bigger parts more often, because they have more chances to be hit.

The parts don't need to be sorted in order of size, which means small values for `target`

don't necessarily imply hitting small body parts. That's not where the statistical odds come from. Where you get the "hit bigger parts more often" is from the fact that there are more values of `target`

that correspond to hitting a large body part, i.e. there's (...counting...) 7 different values that `target`

could be that would give you a hit on body part 1, but only 2 possible values for `target`

that would indicate a hit on body part 2. So on average, over time, you're going to hit bp1 about 7 times out of 30, and bp2 only 2 times out of 30.