[Question]
  [
Create a program that outputs itself. 
However, if the source code is repeated n times *(meaning to concatenate a copy of the source code to the end n-1 times)*, then there should be 1/n probability outputting the original source code, a 1/n probability of outputting the source code repeated twice, a 1/n probability of outputting the source code repeated three times, ..., and a 1/n probability of outputting the source code n times.
For example, if your program is `foobar`, then it should always output exactly `foobar`.
However, if you run `foobarfoobarfoobarfoobar`, then there should be a ¼ chance each of outputting `foobar`, `foobarfoobar`, `foobarfoobarfoobar` and `foobarfoobarfoobarfoobar`.
* The distribution of each possible output should be equal
* In addition to standard I/O methods applying and standard loopholes forbidden, standard quine rules apply (can't access its own source, etc.)
* This is code golf so shortest answer in bytes wins
  
[Answer]
# [Perl 5](https://www.perl.org/), ~~82~~ 80 bytes
```
$s=q($s=q(%s);printf"$s\n+1#",$s for 0..rand);printf"$s\n+1#",$s for 0..rand
+1#
```
[Try it online!](https://tio.run/##K0gtyjH9/1@l2LZQA0yoFmtaFxRl5pWkKakUx@RpGyor6agUK6TlFykY6OkVJealEJLnAor9/w8A "Perl 5 – Try It Online") or [Test suite](https://tio.run/##K0gtyjH9/18lOT8lVcFWQcUxyD0s2iC2AsIwjLXmKijKzCtRUFIAAteK1OTSksy8dKuYPLCOmDyQcFBqcWlOCVBMyZortSwxRwEsZ/0faGyxbaEGmFAt1rQGm5SmpFIck6dtqKyko1KskJZfpGCgp1eUmJdCSJ4LKPbfCAA)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~24~~ 22 bytes
```
“Ṿ;ẋŻɼLX¤¤µ”Ṿ;ẋŻɼLX¤¤µ
```
[Try it online!](https://tio.run/##y0rNyan8//9Rw5yHO/dZP9zVfXT3yT0@EYeWAOHWRw1zsYj@/w8A "Jelly – Try It Online")
[Try it x4!](https://tio.run/##y0rNyan8//9Rw5yHO/dZP9zVfXT3yT0@EYeWAOHWRw1zsYoOvNr//wE)
```
“Ṿ;ẋŻɼLX¤¤µ”Ṿ;ẋŻɼLX¤¤µ
“Ṿ;ẋŻɼLX¤¤µ”              String literal: Ṿ;ẋŻɼLX¤¤µ
            Ṿ             Uneval. Return “Ṿ;ẋŻɼLX¤¤µ” (with quotes)
             ;            Append the initial string. Yields the source code. 
                ɼ         Apply the preceding link to the register and store the 
                          result in the register.
               Ż          Prepend 0. 
                          Each time Żɼ is used when the source code is repeated
                          the register's length increases by one. 
                          We can't use ‘ because it closes string literals.
                 L        Length. Returns the number of times the source code has
                          been repeated up till now.
                  X       Random element. If ɼ results in n, X returns a random 
                          integer between 1 and n.
                   ¤      Combines ŻɼLX as a nilad. 
              ẋ           Repeat the source code a random number of times between
                          1 and n.
                    ¤     Close everything from the initial string literal as a
                          nilad. 
                     µ    Start a new monadic chain. The register gets updated
                          once for time the code is repeated but only the final
                          repetition will result in output.
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 32 bytes
```
"34çìDJ¼32ôн¾L×Ω"34çìDJ¼32ôн¾L×Ω
```
[Try it online!](https://tio.run/##MzBNTDJM/f9fydjk8PLDa1y8Du0xNjq85cLeQ/t8Dk8/txKX@P//AA "05AB1E – Try It Online")
**Explanation**
```
"34çìDJ¼32ôн¾L×Ω"                   # push this string
                 34ç                # push a "-character
                    ì               # prepend it to the string
                     DJ             # duplicate and join the copy to the string
                       ¼            # increment the counter
                        32ô         # split the string into pieces of size 32
                           н        # take the first one
                            ¾L×     # repeat it for each in [1 ... counter]
                               Ω    # pick one at random
```
[Answer]
# [Gol><>](https://github.com/Sp3000/Golfish), 21 bytes
```
:QoaonC|P\Sx*F2ssS"
0
```
[Try it online!](https://tio.run/##S8/PScsszvj/3yowPzE/z7kmICa4QsvNqLg4WInL4P9/AA "Gol><> – Try It Online")
### Explanation:
```
:Q     |     If the top of stack is 0, skip to next |
             Top of stack is implicitly 0
        P    Increment top of stack
         \   Redirect pointer down]
0:QoaonC|P\Sx*F2ssS"  Increment for each copy of the source code
0:QoaonC|P\Sx*F2ssS"
         \   Redirect back to the right
          Sx*  Multiply the number of copies of the source code by a random number between 0 and 1
             F      Repeat that many times
              2ss   Push a double quote
                 S" Print the source code minus the quote, newline and 0
 :Q       If top of stack is not 0
   oaonC  Print the quote, a newline and a 0 to complete the source code and continue the loop
        \Sx*   Error on the * for some reason
```
[Answer]
# [Alice](https://github.com/m-ender/alice), 35 bytes
```
"d3a*h-&;adddd12h&}Uh*t&w.odt,k@
 !
```
[Try it online!](https://tio.run/##S8zJTE79/18pxThRK0NXzToxBQgMjTLUakMztErUyvXyU0p0sh24FBT//wcA "Alice – Try It Online")
### Explanation
```
"
```
Like in many quines in 2D languages, this starts with a `"` that wraps around to itself and pushes the entire first line except the `"` itself.
```
d3a*h-&;
```
Adding one or more additional copies of the source code will place some implicit spaces at the end of the string literal. To make this actually a quine, we truncate the stack at 31 characters.
```
addd
```
Push a newline, then the stack height three times. The values pushed as the stack height are 32 (the space in the second line), 33 (the `!` in the second line), and 34 (the initial `"`).
```
d
```
Push the stack height again, this time as the length of the original source code (35).
```
1
```
Initialize a counter at 1. This will count the number of times the source code is repeated.
```
2h&}
```
Turn right three times in place (i.e., turn left). Each additional repetition of the source code will contribute an `h` in the same column as this `}`, thus incrementing the counter. When the IP returns to the `}`, turn right again to continue in the same direction.
```
Uh
```
Take a uniform random number from 0 to n-1, then add 1 to get the number of times to output the original source.
```
*t&w
```
Multiply by the previously pushed stack height (code length), then repeat the following that many times by pushing a return address that many times minus one.
```
.o
```
Output the top of the stack without destroying it.
```
dt,
```
Move the bottom stack entry to the top.
```
k@
```
Repeat, then terminate after the loop is finished.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 62 bytes
```
(f=a=>b=>b?f(a+.5):`(f=${f})(1)`.repeat(1+Math.random()*a))(1)
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z@cn1ecn5Oql5OfrvFfI8020dYuCYjs0zQStfVMNa0SgGIq1Wm1mhqGmgl6RakFqYklGobavoklGXpFiXkp@bkamlqJmiDp/xqamv8B "JavaScript (Node.js) – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 58 bytes
```
≔´θ´⎚´×´⊕´‽´Ｌ´⊞´Ｏ´υ´ω´⁺´⪫´⁺´´´≔´θ´´´´´θθ⎚×⊕‽Ｌ⊞Ｏυω⁺⪫⁺´≔θ´´θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5//9R55RDW87tOLTlUd@sQ1sOTwcyuqYCiYa9h7a837MGxJ0HYq0/tOV8KxB3AkUadwGJVauhLBCEmwKD53ac2wE08fB0oGlAs4AmAc0BmnK@9XwnUBdQN8SUzikQXed2/P8PAA "Charcoal – Try It Online") No verbose version because the deverbosifier currently chokes on `"´"`. Mostly based on the Charcoal quine from [Golf you a quine for great good!](https://codegolf.stackexchange.com/questions/69). Explanation:
```
≔´θ´⎚´×´⊕´‽´Ｌ´⊞´Ｏ´υ´ω´⁺´⪫´⁺´´´≔´θ´´´´´θθ
```
Assign the literal string `θ⎚×⊕‽Ｌ⊞Ｏυω⁺⪫⁺´≔θ´´θ` to `θ`.
```
⎚
```
Clear any previous output, so that only the last output takes effect.
```
×⊕‽Ｌ⊞Ｏυω
```
Push the empty string to the predefined array. This makes the array length equal to the number of repetitions processed so far, so take its length, take a random number the implicit exclusive range, add 1, and repeat the following string that many times.
```
⁺⪫⁺´≔θ´´θ
```
Prepend the literal string `≔` to `θ`, then insert literal `´`s between each character, then suffix another copy of `θ`.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), ~~118~~ 116 bytes
```
for i in(1,c:=0):
 exec(s:="from random import*;c+=i or print('for i in(1,c:=0):\\n exec(s:=%r)#'%s*randint(1,c))")#
```
[Try it online!](https://tio.run/##K6gsycjPM7YoKPr/Py2/SCFTITNPw1An2crWQNOKSyG1IjVZo9jKVimtKD9XoSgxLwVIZeYW5BeVaFkna9tmKgD1FBRl5pVoqGNoj4nJgxugWqSprK5arAUyAqQaqEZTU0lT@f9/AA "Python 3.8 (pre-release) – Try It Online")
]