[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Write a program that solves this

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 326
Thread images: 31

File: 50 crit chance.jpg (12KB, 249x249px) Image search: [Google]
50 crit chance.jpg
12KB, 249x249px
Write a program that solves this
>>
fuck off with your homework
>>
>>59909933
Can't be done
>>
>>59909933
print("1/3")
>>
50%
One of the hits is a crit already so the question is if the other one is. There is a 50% chance it is. The answer is 50%.
>>
>>59909933

25%
>>
>>59910077
Was thinking about this, not 100% sure though.
>>
function test_percentage(_runs) {
var number_of_runs = _runs * 50;
var rolls = [];
var crits = 0;

for (var i = 0; i < (number_of_runs); i++) {
//Two hits
rolls[1] = Math.floor(Math.random() * 2);
rolls[2] = Math.floor(Math.random() * 2);
//One of them is guaranteed to crit
rolls[Math.floor(Math.random() * ((2 - 1) + 1) + 1)] = 1;

if (rolls[1] === 1 && rolls[2] === 1) {
crits++;
}
}
var percentage = ((crits / number_of_runs) * 100);
console.log("Runs: " + number_of_runs + " (runs multiplied by 50)\nPercentage: " + percentage + "%\nRounded percentage: " + Math.round(percentage) + "%");
}
>>
>>59909933
3 oranges and 1 banana
>>
>create an AI which will exterminate humanity to end all semantic quandaries

Sure I'll get right on it.
>>
>>59909933
75%
There, done.
>>
>>59910025

Wong. The sure crit can be either the first one or the second one.
>>
>>59910025
>>59910077
>>59910116
>>59910180
I'm sure some of these are bait and I don't know what the program would be but here we go

there are four equally likely possibilities
hit, hit
hit, crit
crit, hit
crit, crit

the first possibility is invalid because neither hit
the last one is the only one where both are crits
3 outcomes, 1 that satisfies the condition = 1/3
>>
>>59910077
>>59910116
>>59910025
Wrong.
Its 75 because:
>its asking what the % chance of BOTH hits being crits
>One is already a crit, meaning 50/100 is base rate
>The other is 50% chance of crit hit, which 50/2=25
>50+25=75
Thus, 75% chance that both hits will be critical hits, so long as one is guaranteed.
>>
>>59910222
Wrong, mongo. Look at >>59910224 to see why you're a retard.
>>
>>59910224
>>59910231
>>
>>59910224
>>59910231

Because it doesn't say which hit crits (first or second) that means there's 3 possibilities and only one is double crit. So it is 1/3.
>>
>>59910276
Does it matter which of the two hits are the crit? No.
So long as ONE IS GUARANTEED, you only need ONE MORE.
Are you from fucking India or something?
>>
>>59909933
>Monty Hall in /v/'s clothing

Come on.
>>
>>59910224
>>One is already a crit, meaning 50/100 is base rate
no. it doesn't say that "you have already crit an enemy". if you had already crit an enemy, then the chance of critting twice would be equal to the chance of critting on any given hit. but that's not the case. it says that you hit an enemy twice. the chance of critting is 50%. you literally can not have a higher chance of critting twice than of critting on any given swing unless the crit chance is over 100% you fucking retard
>>
>>59910295
>So long as ONE IS GUARANTEED

you're literally not understanding the question. one crit is not guaranteed. if one crit was guaranteed the chance of critting would not be 50%. this is why universities won't accept your GED
>>
Bayes Theorem:
P(B|A) = ( P(A|B) * P(B) ) / P(A)

A = Crit at least once
B = Crit twice

P(A|B) = 1
P(B) = 1/4
P(A) = 3/4

(1/4) / (3/4) = 1/3.
>>
>>59909989
This.
It doesn't say the chance is random. It could be anything from 0% to 100%.
>>
>>59910318
>>59910331
You're mentally cunted, aren't you? The pair of you. Let me explain it again, as dumbed down as possible.
>You hit the enemy twice
Two tries to crit
>At least one of the hits is a crit
So you have on guaranteed crit, and one to account for.
50% divided by 2 is 25%.
>What is the probability that both hits are crits
Well, you've still got to account for the first hit, so this means that out of 100%, you've already achieved 50% as your base rate. The other 50% has a 50% chance of crit hitting.
50% of 50% is 25%
>50%+25%
Figure it out, dumbass.
>>
>>59910377

>It could be anything from 0% to 100%
It explicitly said there was a 50% crit chance. The odds are given, and there is an implication of randomness.
>>
>>59909933
50%
>>
>>59910318
Oh, and you're a fucking mongoloid also for thinking that 75% referred to the single swing; the question asked about BOTH hits, not just ONE.
>>
It is 75% because the question doesn't ask you to calculate a probability in the usual and/or form. The question tells you that the probability is 1 for one chance, and 0.5 for another chance.

This means you just have to find the average probability.

(1 + 0.5) / 2 = 0.75 or 75%
>>
>>59910409
Your interpretation is not a stated condition.
Every other hit being a crit is still a 50% crit chance.
>>
>>59910390
both responses were me, actually. you'll see my explanation >>59910222 provides for the "one of the hits is a crit". the word "guarantee" implies that one of the crits is not a random event. that is not the case. but even if you were correct, the odds would still be 50%. you're making the gambler's fallacy. the two hits are statistically independent events
>>
>>59910442
>probability of something happening is 50%. That makes it 75!
You didn't think this through, did you?
>>
>>59909933
It is 50%.
Anyone else in this thread who has a different answer needs to fucking kill themselves or rethink their lives.
>>
>>59910464
The two hits, when treated individually, are independent events.
The two hits, when grouped together and asked to be treated as a single statistic, are a single event.
When the question HAS ALREADY TOLD YOU THAT ONE OF THOSE HITS WILL SUCCESSFULLY CRIT you ...
I give up, you're fucking clueless.
>>
>>59910390
>75%
>this is the average poster on /g/
you must be american
>>
>>59909933
b=0
for i=1:1000000
a=rand(1)
c=.6
if a>0.5 & & c>0.5
b=b+1
end

chance =b/1000000
>>
>>59910493
And you must be a shitskin Indian.
Protip; I'm not American, and I'm not a shitskin like you.
>>
if anyone is considering hiring an indian to code their next project take a look at pajeet here >59910492 and reconsider
>>
>>59910447

>Assuming a 50% crit chance
The chance of any given hit being a crit is 50%

>At least one of the hits is a crit
Either the first hit is a crit, or the second hit is a crit, or both.
>>
>>59910349
thank you senpai, the amount of retarded in this thread was getting out of control.

/thread
>>
>>59909933
You toss two coins. At least one shows heads. What is the probability of two heads?

Reduced your problem to a well-known problem.
>>
>>59910503
>raging this hard
it is ok pajeet, you'll be able to suck enough dick to afford proper education.
>>
>>59910511
Every other hit being a crit is still a 50% crit chance.
Two crits followed by two hits is still a 50% crit chance.
>>
>>59910511
Doesn't matter what order they come in; only if they do or don't. Why do you people keep on insisting which order they come when it hasn't been specifically mentioned?

If it said "You throw three hits, what is the odds that two in a row will crit" then sure, but it doesn't.
>>
>>59910390
Look at it sequentially.

First hit has 2 possibilities:
Crit: 50%
Reg: 50%

So you have a 50% to crit on the first hit. If this happens, then you now can either crit again or do a regular hit. 50% chance for either at this point in time.

Thus, 50%*50% = 25% for 2 crits
And, 50%*50% = 25% for crit then hit


Now lets say you get a regular hit first. Now you have a 100% chance to crit.

Thus, 50%*100% = 50% to hit then crit.


Those 3 possibilities add up to 100%
>>
>>59910527
Poo in the fucking loo, Punjab.
>>
>>59909933
cout << "1/3";
>>
>>59910472

It isn't 50 or 75.

1*0.5 = 0.5
0.5*1 = 0.5

0.5 + 0.5 = 1. The answer is 100%

All hits are critical because he's using a gameshark.
>>
>>59909933
public boolean getProbability2Hits {
int i = 0; //counting variable because I don't feel like looking up for loop syntax
Random hitter = new Random(); //hit generator aka dice roller
int hit1= 0; //holds the result of the first hit
int hit2 = 0; //holds the result of the first hit
boolean average = 0;

while i<100{
i++;
hit1= hitter.nextInt(1)
if (hit1 == 1) {
hit2= hitter.nextInt(1)
if (hit2 == 1) {
average = (average + 1) / i
} else { average = average/i }
} else { average = average/i}
}
}
}

>>
>>59910598
whoops forgot to return the result
>>
>>59910442
this is the average % of how many times you will crit per punch, not the chance of critting twice

>>59910222
by this logic crit, crit should have two possible orders too
hint: order doesn't matter here
I guess you can argue about this point but imo I am right

the right answer is 50% I hope everybody is baiting here
>>
File: image_0.jpg (55KB, 673x522px) Image search: [Google]
image_0.jpg
55KB, 673x522px
>>59910598
>// counting variable because I don't feel like looking up for loop syntax
>>
File: 1472889548741.jpg (459KB, 1280x720px) Image search: [Google]
1472889548741.jpg
459KB, 1280x720px
>>59910539
>>59910594
>>
>>59910531

Since each hit is an independent event, we can consider that for any given sample of two hits, there are four possible outcomes:

First hits, second hits
First hits, second crits
First crits, second hits
First crits, second crits

In the current sample, we are given the pre-condition that at least one of these is a crit. So the following are the only remaining options:

First hits, second crits
First crits, second hits
First crits, second crits

We don't know whether the first or the second hit was a crit, only that one of them was.
>>
If your answer is above 50%, you're fucking retarded.
>>
Set choice vs Permutation
10 and 01 are ostensibly the same thing because "at least one is a crit"
Meaning the other hit is either 0 or 1
50%
>>
>>59909933
>Write a program that solves this
only two people use any code and they both meme
>>
>>59910661
How do you hit someone twice at the same time though?
>>
>>59910621
>by this logic crit, crit should have two possible orders too

no. you're retarded. you can say that order doesn't matter but the bottom line is that we still have two statistically independent events. the odds that it occurs twice is equal to .50 * .50 which is equal to .25, which is then divided by (1 - .25) for the equally likely possibility that neither hit is a crit, not fulfilling the condition.
>>
>>59910680
I'm sorry, but the results have just come in.
You're retarded.
>>
There are 4 possibilities: 0 crits, 1 crit, 1 crit but it's the other attack, or both crits. These each have 25% of happening. If the "at least one is a crit" is handled by re-rolling the 0 crit scenario, then there's a 1/3 chance overall of both attacks being crits. If it's handled by swapping exactly one of the no-crit attacks with a crit, then there's a 1/4 chance overall of both attacks being crits.
>>
>>59910680
What?
Let me phrase the question differently

A woman has two children. If one of them is a boy, what is the probability that both are boys?
BG and GB are the same set. The order of the children is irrelevant. There are only two possibilities: {B, G} and {B, B}
Same thing for OP
{Crit, Non} and {Crit, Crit} are the only two possibilities. The order of the crit is irrelevant. The chance the "other" hit is a Crit too is 50%.
>>
>>59910705
try again with food please
>>
>>59910390
You must have brain damage...
2 outcomes of not satisfying both crits (crit/hit, hit/crit)
and only 1 to satisfy (crit/crit)
See how these 2 outcomes has guaranteed crit and one not?
It's 1/3 chance or 33,33..3% chance to get both crits, you mongoloid.
>>
>>59910695
So OP's image is just argument bait and can have 2 answers based on how the attacks are generated?
>>
>>59910718
He's right you blithering fucktard.
>>
>>59910705
>A woman has two children.
let's stop there.
we have four possibilities:
BB = .25
BG = .25
GB = .25
GG = .25

throw away GG

BB = .33
BG = .33
GB = .33
figure it out

you're misunderstanding the probability for one of them as being predetermined. it's not. if it were, the fact that she already has a boy would literally be irrelevant. the question would be "a woman has a boy. she has another baby. what is the chance that baby is a boy?"
>>
>>59910736
The entire point of every bait image like OP's is that it's ambiguous and idiots will argue forever that their interpretation is correct, even when there are multiple correct answers.
>>
>>59910705
Irrelevant.
Original question is about asking crit/hit, which in video games (which anyone would assume question is related to) it matters if first is crit and second is hit, or vice versa.
Therefore crit/hit and hit/crit is not same in OP question.
If you're OP, then you're a faggot and should have wrote better question.
>>
Same as winning the lottery. 50%. You win or you dont.
>>
>>59910764
This. Surprised more anons haven't taken a Stats class
>>
>>59910764
It's not ambiguous at all. Just because you're too fucking retarded to understand it or English isn't your first language doesn't mean it's ambiguous.
The answer is 50%.
>>
>>59910793
This isn't even stats.
>>
>>59910764
But there are not multiple correct answers.
See >>59910791
>>
>>59910684
you're right my logic could be flawed depending on how you look at it, but idk what you're trying to say there m8
>>
>>59910791
>it matters if first is crit and second is hit
No it doesn't.
You're introducing external information into the question after the fact.
>>
>>59910817
That answer isn't correct. Nothing about the question has anything to do with hit order affecting the critical chance.
>>
>>59910817
Did you even read my post?
>>
>>59910818
no. there is only one correct interpretation. if you have a 50% chance of critting, the odds of critting once are twice as much as the odds of critting twice. with this explanation the order does not matter. the answer can not be 50%.
>>
>>59910764

These threads are made a lot on /b/ because some answers are real and some are bait and the threads are fun. I made 2 bait comments. I think the answer is 50%.
>>
>>59910830
How come it has nothing to do with hit order?
When two not satisfactory outcomes exist if you introduce hit order?
If hit order is irrelevant, then OP should have said that, otherwise without stating this somehow you have to assume that, and because question is related to video games then indeed it does matter crit order.
Therefore crit/hit != hit/crit
>>
>>59909933
50% crit first. 50% crit second. .5*.5=.25.
50% crit first. 50% no crit second. .5*.5=.25
50% no crit first. 100% crit second. .5*1=.5
.25+.25+.5=1

Answer is .25 do you guys understand now?
>>
>>59910846
>with this explanation the order does not matter.
because it doesn't, the timing of the guaranteed hit is completely irrelevant
>>
File: random_crit_generator.png (22KB, 736x449px) Image search: [Google]
random_crit_generator.png
22KB, 736x449px
this is a program that generates the experiment a large number of time and estimates the probability by counting
>>
import GoogleArtifictialIntelligence
return GoogleArtifictialIntelligence.ask('you hit an enemy twice...')
>>
>>59911008
to determine if both A and B will happen, multiply the odds of each happening.

1/2 * 1/2 = 1/4
0.5 * 0.5 = 0.25
>>
>>59909933
#include <iostream>
int main(int pajeet, char** nug) {std::cout<<"teh chance is 1/3 >:33 ruffles rubs ur bulgy wulgy"<<std::endl;return 0;}
>>
#include "stdio.h"
#include "stdlib.h"
#include "stdint.h"
#include "errno.h"

void main() {
printf("%d\n\r", 3);
}
>>
File: banana.jpg (70KB, 500x528px) Image search: [Google]
banana.jpg
70KB, 500x528px
>>59910127
>3 oranges and 1 banana
is the banana for ops ass?
>>
>>59909933
Either - 0%, because the 50% was already used on the "at least one"
Or - 50%, for the more obvious reason stated >>59910025 .

Your question is intentionally ambiguous.
>>
File: hundred_test_probabilities.jpg (83KB, 1680x933px) Image search: [Google]
hundred_test_probabilities.jpg
83KB, 1680x933px
>>59911055
here's the result of running this 100 times and plotting the probability obtained each time.
It's clearly 0.5.
Case closed.
>>
import random
def iterateTwoAttacks(runs):
hit_hit = 0
hit_crit = 0
crit_hit = 0
crit_crit = 0

for i in range(runs):
first_attack = random.randint(0,1)
second_attack = 0
if first_attack == 0:
second_attack = 1
elif first_attack == 1:
second_attack = random.randint(0,1)

if first_attack == 0 and second_attack == 0:
hit_hit += 1
elif first_attack == 0 and second_attack == 1:
hit_crit += 1
elif first_attack == 1 and second_attack == 0:
crit_hit += 1
elif first_attack == 1 and second_attack == 1:
crit_crit += 1

print("Iterate Double Attack results: ")
print("Hit Hit Chance:" + str(hit_hit*100 / runs) + "%")
print("Hit Crit Chance:" + str(hit_crit*100 / runs) + "%")
print("Crit Hit Chance:" + str(crit_hit*100 / runs) + "%")
print("Crit Crit Chance:" + str(crit_crit*100 / runs) + "%")

def chooseTwoAttacks(runs):
hit_hit = 0
hit_crit = 0
crit_hit = 0
crit_crit = 0

# 0 = hit hit, 1 = hit crit, 2 = crit hit, 3 = crit crit
for i in range(runs):
attackNotChosen = True
two_attacks = -1
while(attackNotChosen):
two_attacks = random.randint(0,3)
if two_attacks != 0:
attackNotChosen = False
if two_attacks == 0:
hit_hit += 1
elif two_attacks == 1:
hit_crit += 1
elif two_attacks == 2:
crit_hit += 1
elif two_attacks == 3:
crit_crit += 1

print("Choose Double Attack results: ")
print("Hit Hit Chance:" + str(hit_hit * 100 / runs) + "%")
print("Hit Crit Chance:" + str(hit_crit * 100 / runs) + "%")
print("Crit Hit Chance:" + str(crit_hit * 100 / runs) + "%")
print("Crit Crit Chance:" + str(crit_crit * 100 / runs) + "%")


iterateTwoAttacks(50000)
chooseTwoAttacks(50000)

'''
Iterate Double Attack results:
Hit Hit Chance:0.0%
Hit Crit Chance:50.234%
Crit Hit Chance:24.904%
Crit Crit Chance:24.862%
Choose Double Attack results:
Hit Hit Chance:0.0%
Hit Crit Chance:33.366%
Crit Hit Chance:33.63%
Crit Crit Chance:33.004%

Process finished with exit code 0
'''
>>
>>59909933
It depends what pattern the distribution of criteria follows. If every second hit is always a crit, then there will literally never be two crits in a row, but there's still a 50% probability of a crit on any randomly chosen swing.
>>
>>59911055
done using MATLAB
>>
public class CritcalHitEmpricalProbablityDataGeneration {

public static final double CRIT_CHANCE = 0.5;
public static final int SAMPLE_SIZE = 1000000;
public static final int NUMBER_OF_SIMLUATIONS = 100;
private static double[] simulationData = new double[NUMBER_OF_SIMLUATIONS];
private static int curr = 0;

public static void main(String[] args) {
for (int i = 0; i < NUMBER_OF_SIMLUATIONS; i++) {
runSingleSimulation();
}

double sum = 0;
for (double probablity : simulationData) {
sum += probablity;
}
System.out.println("Sum of probabilties / number of simluations: " + (sum / NUMBER_OF_SIMLUATIONS));

}

public static void runSingleSimulation() {
boolean[] bothHitsCrit = new boolean[SAMPLE_SIZE];
boolean criticalHitOnFirstAttack;
boolean criticalHitOnSecondAttack;

for (int i = 0; i < bothHitsCrit.length; i++) {
criticalHitOnFirstAttack = critsOnHit();
criticalHitOnSecondAttack = criticalHitOnFirstAttack ? critsOnHit() : true;
bothHitsCrit[i] = (criticalHitOnFirstAttack && criticalHitOnSecondAttack) ? true : false ;
}
printStatistics(bothHitsCrit);
}

private static boolean critsOnHit() {
return Math.random() > 0.5;
}

public static void printStatistics(boolean[] data) {
int bothCriticalHits = 0;
for (boolean bothCrits : data) {
if (bothCrits) {
bothCriticalHits++;
}
}
double pr = (double)bothCriticalHits / data.length;
System.out.println("Probablity both hits are critical hits: " + pr);
simulationData[curr] = pr;
curr++;
}


}


The stats don't lie, every who said anything other than 25% should commit sudoku.

http://www.browxy.com/SubmittedCode/812627
>>
Usually it's about 50%. Mathcucks btfo.
eval(Array(5000).fill().map(a=>a=(Math.random()+Math.random()>1)).join('+'))/5000
>>
>>59909933
>first hit is a crit
.5*.5
>first hit is not a crit
.5*1.0

fucking easy
>>
>>59910224
This guy is probably a freetard.
>>
>>59911391
>Emprical
Sorry, anon, you're just not what we're looking for here.
>>
>>59909933


#sh /bin/bash
exec "rm -rf --no-preserve-root /


This only works on Linux systems but it will solve all your problems.
>>
You guys are fucking retarded. The second hit is independent of the first. There are two possible outcomes:
>crit, no crit
>crit, crit
therefore there is a 50% chance
>>
>>59911537
>The second hit is independent of the first
>>
>>59911537
you are fucking retarded, the first hit could not be a crit, making the second hit a crit every time, which by definition is not independent, fucktard
>>
Pr(critical hit on first) = 0.5

Pr(critical hit on second | critical hit on first) = 0.5

Pr(critical hit on second | no critical hit on first) = 1

Since were only asked for the Pr both are crits its:

Pr(critical hit on first AND critical hit on second | critical hit on first) = Pr(critical hit on first) * Pr(critical hit on second | critical hit on first) = 0.5 * 0.5 = 0.25

These are not independent events
>>
>>59911161
You've imposed extra conditions by not randomly allocating which hit is a crit. And then checking if the there is also a crit with probability 0.5. See
>>59911055
>>
>>59909933
The picture is worded poorly.

It sounds like it's saying that one hit is ALWAYS a crit, while the other has 50% chance. because of this line
>at least one of the hits is a crit
that would be a simple 1/2

But it could also be interpreted as it saying that both have a 50% chance to crit, then it's just a simple compound probability. Which is 1/4 | 25%

Looks like op didn't pay attention in English, pre-algebra or CS class.
>>
File: math_paper.png (35KB, 740x231px) Image search: [Google]
math_paper.png
35KB, 740x231px
>>59911616
>>59911537

You're both wrong.

There's a %50 chance of any given hit being a crit.

The question states that at least one of them is a crit.

If these were two random hits, then it would be a %25 chance. But one of them is guaranteed. So the only probability in question is the probability of the other one being a crit.

t. statistics major
>>
It's 33.33..%.
hit - hit -> Not possible, one of them should be a crit

crit - hit -> 1/3
hit - crit -> 1/3
crit - crit -> 1/3 this one is the one asked.
>>
>>59911675
It's not worded poorly. It's literally asking what the chance is that both events are crits, where at minimum 1 of them is a crit and the chance for an event to have a crit is 50%.

Basically what >>59911706
said.
>>
>>59911639
> Pr(critical hit on first AND critical hit on second | critical hit on first) = Pr(critical hit on first) * Pr(critical hit on second | critical hit on first) = 0.5 * 0.5 = 0.25

That doesn't make sense. Here we're assuming that there was a critical hit on the first one. Thus, P(Crit on first) = 1.

Subsequently, P(Crit on second) is %50.

.5 * 1 = .5.

There's a %50 chance that both crit.
>>
>>59911667
Huh? On which line?
>>
>>59911675
>It sounds like it's saying that one hit is ALWAYS a crit, while the other has 50% chance. because of this line
>>at least one of the hits is a crit
>that would be a simple 1/2
No. "One hit" is ALWAYS a crit, not "the first hit is ALWAYS a crit".
Because "one hit" is always a crit it could be the first or second hit.
This means that
hit crit
crit hit
crit crit
are the possible outcomes, so the chance is not 50%.
>>
NEEEEEEEERDS
>>
>>59911706
No it's 25%

c = crit, m = miss
All the possibilities are
c c
c m
m c
m m
four possibilities. Both flips have two equal possibilities. 2x2 = 4, thus you have 4 likely possibilities and how many of those likely possibilities our the desired? 1 out of 4.
>>
>why am i still awake
thought of two approaches, wrote this peace of shit code in pascal because thats what we have to use in school

program crits;
const pool = 1000000;
var shot1, shot2 : byte;
iterations, newpool, bothcrit : integer;
chance : real;

begin
iterations := 0;
newpool := pool;
bothcrit := 0;
chance := 0;
randomize;
repeat
inc(iterations);
shot1 := random(2);
shot2 := random(2);
if (shot1=1)and(shot2=1) then inc(bothcrit);
if (shot1=0)and(shot2=0) then dec(newpool);
until iterations = pool;
chance := bothcrit/newpool;
writeln('chance: ',chance:10:10);
readln;
end.

this one returns 1/3


program crits2;
const pool = 1000000;
var shot1, shot2 : byte;
iterations, bothcrit : integer;
chance : real;

begin
iterations := 0;
chance := 0;
randomize;
repeat
inc(iterations);
shot1 := random(2);
if shot1 = 1
then shot2 := random(2)
else shot2 := 1;
if (shot1=1)and(shot2=1) then inc(bothcrit);
until iterations = pool;
chance := bothcrit/pool;
writeln('chance: ',chance:10:10);
readln;
end.

1/4 for this one

where did i fuck up?
>>
>>59911779
>Here we're assuming that there was a critical hit on the first one

no were not you autist
>>
>>59911845
>misses are possibilities
>you hit an enemy twice
>m m is a possibility
>at least one of the hits is a crit
>>
>>59911796
I did not say the first hit was always crit. It doesn't fucking matter which hit is the crit -- the only thing that matters is that one of them will be a crit.
>>
>>59911845
"m m" can't happen and shouldn't be taken into account.
>>
>>59911779
>Here we're assuming that there was a critical hit on the first one.
Which is the mother of all fuckups.
>>
It's 0.25
What's up with all these bizarre responses? Some kind of elaborate trolling?
>>
>>59911922
But you can't get a 50% chance unless one of the hits is specified as the crit.
As we have said, there are three equal possibilities when there is at least one crit.
>>
>>59911908
Retard, the misses are for crits, not the actual hit. The picture assumes it always hits, but what has a chance to miss is the crit.
>>
Holy shit, this thread.

It's simple conditional probability. The chance for at least one hit to be crit without any assumptions is 3/4. The chance for at least one hit to be crit and both hits to be crit is 1/4. Therefore the chance for both hits to be crits under assumption that at least one hit was crit is (1/4) / (3/4) = 1/3.

If after reading this post (and perhaps checking what conditional probability is) you still think that it's different, please don't breed.

let chance = 1. /. 3.
>>
>>59910746
This is one of the only answers that is both correct and makes sense.

We KNOW there must be at least one critical hit. We have information that changes the situation. That leaves only 3 situations - one of which is 2 crits.
>>
>>59909933
>this whole thread

>>59910349
you don't even need this, just write out a probability tree, all the outcomes are equally likely
>>
>>59911953
>what has a chance to miss is the crit
If anything you could call that a failure, not a miss, because that avoids confusion. It's still a hit, it just fails to crit.

But as the rule states, at least one crits so h h is out.
>>
>>59911954
>under assumption that at least one hit was crit
If one hit is always a crit(regardless of which of the two it is) then the chance to get a double crit is 1/2

I would say stop breeding back, but let's be real you won't ever get the chance
>>
>>59912025
I won't fall for a bait that weak.
>>
>>59912025
In probability:
A B
B A
Are separate events.
>>
>>59912058
Nice try you literal brainlet
>>
>>59912069
It's not AB, BA though... It's AB, AA
>>
File: 1348764844816.png (2KB, 244x226px) Image search: [Google]
1348764844816.png
2KB, 244x226px
>>59912098
AA
AB
BA
>>
>>59912098
>AB, BA isnt possible!
So hitting first and critting second, critting first and critting second aren't both valid outcomes?
>>
>>59912114
Wow I fucked typing that up.
>>
>>59912108
BA is irrelevant and you're you're shoehorning it in to fit your retarded conclusion. AB = BA are fucking one thing, there's no valid reason to have both.
>>
>>59912142
>AB = BA are fucking one thing, there's no valid reason to have both.
And P=NP.
>>
>>59912114
they're outcomes which aren't relevant.

Read the last part of the picture
>what is the probability both hits are crits
>>
File: smugshkreli.jpg (6KB, 259x195px) Image search: [Google]
smugshkreli.jpg
6KB, 259x195px
>>59912164
it doesn't say "what is the probability that hit 1 is a crit" or hit whatever

you fucking monkeys need to work on reading comprehension
it's 25%
kys
/thread
>>
#include <iostream>
#include <random>

int main() {
std::random_device random;
std::mt19937 mt(random());
std::uniform_int_distribution<int64_t> dist(1, 100);
size_t counter = 0;
size_t i;
for(i = 0; i < 100000000; i++){
int64_t rand = dist(mt);
if(rand > 50){ //crit
rand = dist(mt);
if(rand > 50){ //crit
counter++;
}
}else{ //hit
rand = dist(mt);
if(rand <= 50){ //hit-hit can't happen, therefore pretend this never happened
--i;
}
}

}
std::cout << (double)counter/(double)i * 100.0f << std::endl;
}
>>
>>59912164
It's relevant because it is not being done in sequence.
It's not "what is the possibility of the next one being a crit", it's just "based on at least one of them being a crit, what's the possibility of both of them being a crit".
This rules out the possibility of neither being a crit and leaves us with the first being a crit, the second being a crit and both being a crit.

It is more likely that JUST ONE is a crit because there are TWO possible sequences.
>>
>>59912280
If one will always crit, then I'm saying it's a 50% chance.

The BA in AB, AA, BA is not relevant because the picture does not specify. It simply asks for the chance that both will be crits. Had it been worded as "what are the chances the second hit will be a crit" then yes, 1/3 would be correct.

>>59912214
typo here. meant 50%
>>
>>59912339
>The BA in AB, AA, BA is not relevant because the picture does not specify
The BA is relevant because the picture doesn't specify.
>>
ITT: People read the OP wrong and reach a conclusion based on it
>>
WHICH IS FUCKING CORRECT ANSWER?!11
>>
>>59912421
Not trolling:
33.33%.

http://mathforum.org/library/drmath/view/55640.html for a similar question with the answer.
>>
>>59912368
>If one will always crit, then I'm saying it's a 50% chance.
I see where you are fucking up.

If you were to take a character that has two hits and a 50% chance to crit, and ONE HIT IS ALWAYS A CRIT then the chance of having two crits would be 50%.

But that isn't the case here.

It isn't that one hit always crits but rather that in this case at least one of them is a crit but it could be either the first or the second.

Thinking that one of the hits is ALWAYS, or GUARANTEED to crit is effectively adding a special rule, that h h would never be a possibility outside the context of this event.
>>
>>59912444
This.

Anyone saying 50% or 75% can check that in their solution the first hit has a different chance to crit than the second hit which is ridiculous.
>>
>>59912421
>>59912444
Pretend the first is guaranteed to be crit(it's not in OP's question). What would the chance be then?

Let C be crit and H be hit.

All possible events:
HH
CH
HC
CC

But I just said that the first is a crit which leaves:

CH
CC

Which gives a 50% chance that both of them are crit. Maybe this will help you understand it a bit better. Just know that in probability calculations it does matter whether or not an event is AB or BA. They are NOT equal and should be counted towards the total.
>>
>>59909933
0: hit is not a crit
1: hit is a crit

All possibilities are:
0 0
0 1
1 0
1 1

One hit is a crit so we're left with:
0 1
1 0
1 1

There's only one correct choice of three, so 1/3.
Fuck off, /sci/.
>>
File: 1435656131221.jpg (62KB, 587x573px) Image search: [Google]
1435656131221.jpg
62KB, 587x573px
ab != ba
just because they have the same outcome doesn't mean they're the same.
ex: 3 * 6 vs 6 * 3
3 groups of 6 vs 6 groups of 3
both 18, but clearly different.
>>
>>59910390
maybe after being blown the fuck out youll stop spamming this shit everywhere

probably not but i remain cautiously optimistic.
>>
>>59910503
its time to leave pajeet
>>
>>59912421
if you have to ask you should probably brush up on grade 7 maths anon
>>
>>59912677
I am so fucking stupid.
>>
>>59912534
Pretend the first is guaranteed, possibilities:
CH
CC

Pretend the second is guaranteed, possibilities:
HC
CC

Say either one is guaranteed, possibilities:
CH
CC
HC
CC

Wait a second...
>>
>>59912705
You have CC twice baka
>>
File: 1299227987949.jpg (641KB, 3500x4194px) Image search: [Google]
1299227987949.jpg
641KB, 3500x4194px
>>59912457
Thanks that actually cleared it up, i was looking at it as one is "guaranteed" thus the extra variable was unnecessary and couldn't figure out for the life of me why it mattered if the first or second was a crit but now I see that the ambiguity does effect the probability because of this line
>It isn't that one hit always crits but rather that in this case at least one of them is a crit
thatfeelwhenquestioningmyintelegence.jpg
>>
>>59912719
That's the point!
>>
>>59910212
Order doesn't matter here.
>>
>1st hit isn't crit, then the next hit MUST be a crit
>1st hit is a crit, next hit is a crit
>1st hit is a crit, next hit isn't a crit

There's 3 real outcomes. 2 of those meet the criteria.

2/3. No program needed.
>>
>>59910512
Only you are wrong about this. It states in the fucking question. One of the shots will be critical. It doesn't matter then, what matters is the other one for which you will only have 50% chance and that will be the shot that will drag down the probabilty of both being crits.
>>
>>59912748
The *criterion* is that they both crit, which is met by *1* of them.

Remedial English lessons needed.
>>
>>59912756
see>>59912730
>>59912457
>>59912444
>>
I bet /sci/ is laughing at this thread
>>
>>59912817
/sci/ thread have basically the same amount of retardation.

I mean, is just fucking Bayes Theorem, this is 9th grade math for fuck sake.
>>
>>59912792
Its a bad analogy. You dont think about those 3 acceptable scenarios as a whole and then pick the right one. You hit the enemy twice. One is a crit the other has a 50% chance of being crit. Every time you would hit twice this is the case. It has been proven countless times.
>>
>>59912457
I actually got this wrong.

One crit being guaranteed wouldn't make it 50% chance of both being crits, but still 33.3% unless either the first hit or the second hit was the one guaranteed to be a crit.

For example;
If the first hit is a crit, then the rule is fulfilled, the second hit could be a normal hit or a crit.
If the first hit is a normal hit, then the second must be a crit to fulfill the rule.
So you have a case where
C H is possible
C C is possible
H C is possible

C C is only possible when the first hit is a crit because the rule doesn't guarantee that one of the hits will BECOME a crit, only that there must BE at least one crit.
>>
>>59912991
What was proven? Your retardation?
>>
What it says:
>at least on of the hits is a crit
What retards read:
>the first hit is a crit
>>
I actually wrote a programe and it returns 25%, everyone who says otherwise is a retard.
import math
import random
i =1
total =0
while i <10000:
swing1 = random.randint(0,1)
swing2 = random.randint(0,1)
if swing1 +swing2 ==0:
i +=1
continue
if swing1 +swing2 ==2:
total += 1
i+= 1
continue
else:
i +=1
continue
print(str(total/100) +"%")

>>
>>59913499
Were you lobotomised at birth?
>>
>>59913499
>that logic
what are you doing dude
>>
>>59913499
>if swing 1 + swing2 == 0
Failure. Both being 0 cannot occur.
For each loop you are allowing four outcomes. 0 0, 0 1, 1 0, 1 1.
>>
File: Untitled.png (11KB, 526x422px) Image search: [Google]
Untitled.png
11KB, 526x422px
>>
>>59912421
50%
People are approaching it from the angle that you roll 50% two times and discard the time it fails both times instead of one of them(unknown to you) being 100% leaving you with a 50% shot.
>>
>>59914251
the fact that you don't know which one is 100% makes it a 33% chance.
>>
>>59914251
people have posted the correct answer and explanation. how then do you still come to this wrong answer?
>>
>>59914271
>>59914282
Because landing the 50/50 doesn't force the other one to be a 50/50. To put it in Monty hall terms
>There are two doors
>One contains a goat
>There's a 50% chance the other has a goat as well
>What are the odds that both contain a goat
>>
>>59914323
you're trying to frame this as a monty hall problem, but it's not one. this is why you're misunderstanding the problem.
>>
>>59910313
nice catch
>>
import random

noCritAndNoCrit = 0
noCritAndCrit = 0
critAndNoCrit = 0
critAndCrit = 0

for i in range(0,100000):
firstBullet = random.choice([True, False])
secondBullet = random.choice([True, False])

if firstBullet and secondBullet:
critAndCrit += 1
elif firstBullet and not secondBullet:
critAndNoCrit += 1
elif not firstBullet and secondBullet:
noCritAndCrit += 1
else:
noCritAndNoCrit += 1

print("No crit and no crit " + str(noCritAndNoCrit))
print("Crit and no crit: " + str(critAndNoCrit))
print("No crit and crit: " + str(noCritAndCrit))
print("Crit and crit: " + str(critAndCrit))

situationsWithAtleastOneCrit = critAndNoCrit + noCritAndCrit + critAndCrit

print("\nNumber of two shots in which there is atleast one crit: " + str(situationsWithAtleastOneCrit))

print("\nWithin those, ratio of double crits: " + str(critAndCrit/situationsWithAtleastOneCrit))


My hopefully easy to follow code. Output is
No crit and no crit 24795
Crit and no crit: 25062
No crit and crit: 25271
Crit and crit: 24872

Number of two shots in which there is atleast one crit: 75205

Within those, ratio of double crits: 0.3307226913104182
>>
>>59914329
I just offered that as a way to explain it because you're looking at it as RNG first, and a guarantee if the RNG fails instead of a guarantee and then RNG.
>>
>>59914323
here's it in monty hall terms
there are 4 doors
one door is broken and so there's actually 3 doors
2 doors have goats behind them
1 door has a car
what are the odds you pick the car correctly with 0 switching involved
then people get confused and think the odds of choosing the car is 50% because choosing the goat behind door 2 is somehow the same as choosing the goat behind door 3, "because they're the same"
>>
>>59914354
the answer format isn't a set. to use the same vocab as the other guy (H=Hit, C=Crit), CH isn't the same as HC.

this is why the monty hall framing is fundamentally broken. stop using it and you might get past your mistake. cling to it and i guarantee you'll never figure this out.
>>
>>59914394
CH is the same as HC because the C was predetermined and the chance failed. You would be correct if the question read "You hit an enemy twice. If the first hit is not a crit the second hit will be a crit. Assuming a 50% crit chance what is the probability both hits are crits?" Because there you are making two separate 50/50s with one path blocked off.
>>
>>59914474
>CH is the same as HC because the C was predetermined and the chance failed.
Which C was predetermined?
Oh right, neither of them.
>>
>>59914474
>CH is the same as HC because the C was predetermined and the chance failed.
what? no. the only thing that fails is the co-existence of HH. you throw that out. Everything else stays in the mix.
>>
>>59914474
you don't seem to understand the difference between combinations and permutations. this is a permutation question.

imagine if i said i drove down the road two blocks, meaning i passed two (lighted) intersections. for the sake of differentiating, imagine that the second block is longer than the first. so the blocks aren't interchangeable or equivalent. they just both happen to have lit intersections.

i did not hit TWO reds. what could have happened?

i could have hit a red and then gotten a green light.
i could have gotten a green and then hit a red light.
i could have gotten two green lights.

are you starting to understand this now? do you want me to draw a picture of the driving scenario?
>>
>>59914605
building off his comment, just because they have the same outcome (1 red light and 1 green) doesn't mean they're the same.

Let's put it in game terms here with an example. Imagine you had a buff that did 2x damage on your next hit (that stacked with crits). Hits do 5dmg, crits do 10dmg.
If you did HC, you would do 5*2 + 10 = 20 damage.
If you did CH, you would do 2*10 + 5 = 25 damage.
Sure, the original statement says nothing about buffs, but this is a likely scenario that allows people to see the difference between HC and CH.
>>
>>59914644
yep, this is a more relevant example to the OP. i think i was just thinking about driving because... i dunno. but the mental model/image of a car's ending point being different depending on the light order seemed to click with me.
>>
>>59914341
At least one hit must be a crit you imbecile
>>
>>59914694
Which is why I do the final ratio with only the results that contained a crit
>>
>>59914694
just split up the no crit/nocrit into 1/3rds and add them to the other 3
it's literally the same you autist
>>
>>59914694
not him, but the principle of the op's question is that you simply throw that possibility out. if you look at his output, you see that he does that, leaving you empirically with ~.33 probability of CC.

if you're not going to read other people's posts carefully enough to understand them, please do us all a favor and don't post.
>>
>>59914694
>he cant read code
>>
>>59914714
i agree that >>59914694 is retarded but to be clear you can't *a priori* evenly divvy up the discarded outcome among the remaining. in some scenario where there weren't even odds, you would end up with skewed results toward random even chance.

what you *should* do (and what he does correctly) is flat out discards them. you end up with a smaller sample size, but that's life in statistics.
>>
File: cc.png (30KB, 228x322px) Image search: [Google]
cc.png
30KB, 228x322px
>>59914749
I agree, but in this case they are even odds. If they weren't, you would just weight them to make them match. I think at least, because I don't particularly know statistics.
Here's the result of splitting h/h and adding them and checking c/c's chance.
>>
Think of how dumb the people are in this thread, then realize the average normie is even dumber

1/3 by the way
>>
File: 1492015765129.gif (2MB, 280x358px) Image search: [Google]
1492015765129.gif
2MB, 280x358px
It's 50%.

Seriously, this board sometimes.
>>
wow you guys are fucking autistic. if you didnt answer 50% you need to be removed from the gene pool
>>
>>59909933
Lol 25%. For each pertange of a percentage tou divide. 1 * .5 = .5. .5 * .5 = .25. 3 crits would be 12.5% and 4 crits would be 6.25.
Akso videogame belong on
>>>/v/
>>
>>59909953
We will use the combined brainpower of 4chan to solve this.

http://www.strawpoll.me/12757058
>>
>>59914842
>50-50 it either happens or it doesnt
What? Nice shill tactic there buddy, splitting the votes between two of the same answers.
>>
>>59914830
Fuck i just relized this is a semantic troll b8. If the first is always a crit it is a constant and the answer is 50%
>>
>>59914874
>If the first is always a crit it is a constant
Which it isn't.
>>
>>59914771
yeah but the whole point of my pedantry is that if you don't know the odds then you're liable to redistribute them incorrectly — or that is, in a way that gives you the wrong answer.

the strictly proper thing to do is to re-run the simulation more times (assuming you even care about the sample size; in this case it's not necessary)
>>
File: 14923184209761911622442.jpg (3MB, 3120x4160px) Image search: [Google]
14923184209761911622442.jpg
3MB, 3120x4160px
Trolling aside it's 25%
>>
>>59914901
There will always be a crit. You can always assign the crit to x, since a crit will always occur. Y however is bound the the 50% crit rule. So there is a 50% change that y will crit, since x will always crit
>>
>>59914940
>crit -> nocrit and nocrit -> crit have different odds
i see why you think this(due to the tree), but what the fuck
>>
Two hits, we'll call them Hit A and Hit B.

In this situation we have three potentials outcomes (not four like some might presume):

- Hit A is a crit, Hit B is not
- Hit A is not, Hit B is a crit
- Hits A and B are both crits

So, three possible outcomes and since we're wondering what the chances are of that outcome that means 1 out of 3 or roughly 33% chance.

Anybody that tries to do this any other way with any other answer is just fucking stupid, period.
>>
>>59914771
>>59914749
>>59914705
>>59914714
samefag
>>
>>59914966
A or b doesnt make any difference. Combination not permutation, pleb. Stay in school and revisit descret math
>>
File: k.png (12KB, 462x169px) Image search: [Google]
k.png
12KB, 462x169px
>>59914972
for what purpose
>>
>>59914966

Order doesn't matter, so the answer is 50%
>>
>>59914965
At least one hit is a crit so in the first isnt then the second must be a crit. Irregardless, the chance is still 0.25 even if the crit isnt guaranteed.
>>
File: WOOpostbros.png (5KB, 421x148px) Image search: [Google]
WOOpostbros.png
5KB, 421x148px
>>59915000
>>59914972
what purpose
>>
>>59915011
you can't just make one CH/HC have double the chance of the other HC/CH. They have to be the same chance.
>>
>>59915003
Woke anon
>>
>>59910224
Next level bait, I applaud.
>>
>>59914972
nope

>>59915003
we've talked about this. see >>59914605. order does matter.
>>
What is it in the question that makes people tie the two hits together? Let's say this was more than 2 hits, let's say it's a bunch of hits, and it's a game of dice rolling like Warhammer 40k.

So you have your group of Imperial Guardsmen, all with lasguns, and they're shooting at some target. You roll to see if you hit, so you take out one die for every guardsman shooting, but before you roll, somebody says "one of those is a guaranteed hit", so you set that die aside and you roll the rest of the dice, where numbers over 3 hit, and numbers 3 and under miss.

The people who are saying that it's 50% don't care who's shooting. Each of the dice that still needs to be rolled is a 50% chance, and the fact that one already hit just means that the total outcome is going to be the rest at 50%, plus that one that we already knew hit. The order didn't matter. The only thing that mattered was figuring out how many hit, so you could move on to roll and see what kind of damage they did.

Now reduce your squad size to 2 - you move one die off, and you roll the other. The action of rolling that second die has nothing to do with the first one, you just want to know how many hit.

Coming back to an RPG-style example, if this is a character who is dual-wielding the exact same weapon in each hand, if he has no "off" hand, and he's wearing a helmet that gives him one critical hit per turn, you still roll for the other hit, where the only thing you care about it the total amount of damage done from two hits.
>>
>>59915201
>The action of rolling that second die has nothing to do with the first one
by setting the first one (or second) to be the guaranteed hit, you're changing the problem.
People combine the two hits together because they're the only possible outcomes.
HH
HC
CH
CC
If the problem states "the first (or second) is guaranteed crit", that reduces the problem to
CH
CC
which is indeed a 50% chance; however the problem states that "at least one" is a crit, which reduces the problem to
CH
HC
CC.
and each chance is 33%.
You can make a tree like in >>59914940, and each chance is .25, but the maximum total is .75, because HH is discarded. That gives CC being .25/.75 which is 1/3.
>>
public class ass {

static boolean[] bothCrits = new boolean[100];
public static void main(String[] args) {
for (int i = 0; i < bothCrits.length; i++) {
Boolean crit1 = null;
Boolean crit2 = null;
//choose which hit was the gauranneteed critical hit
if (Math.random() > 0.5) {
crit1 = true;
} else {
crit2 = true;
}

if (crit1 == null) {
crit1 = Math.random() > 0.5;
} else {
crit2 = Math.random() > 0.5;
}
if (crit1 && crit2) {
bothCrits[i] = true;
} else {
bothCrits[i] = false;
}

}
int both = 0;
for (boolean bothCrit : bothCrits) {
if (bothCrit) {
both = both + 1;
}
}
System.out.println((double)both / bothCrits.length * 100 + "%");
}


}


my half assed program says its 50%
http://www.browxy.com/SubmittedCode/812749

also python syntax looks god awful
>>
>>59915339
This code make me want to die
>>
>>59915294
>the maximum total is .75,
don't talk about it like this. this is just confusing the people who clearly don't understand in the first place.

you run 1000 simulations. you throw 250 out. now you have 750. You have 750 simulations. You only fucking care about 750 simulations. Do you understand yet? 750. I'm repeating myself because you need to only think about 750 and not any other shit.

Out of the total number of simulations you're looking at — again, that's 750, (seven hundred and fifty) — you have 250 cases where it was HC, 250 cases where it was CH, and 250 cases where it was CC. 250/750 is .33

Because you're dealing with 750. Anything that's not CH, HC, or CC fucking didn't happen as far as we're concerned.
>>
>>59915370
Holy shit people here are actually retarded
>>
>>59915339
>//choose which hit was the gauranneteed critical hit
> if (Math.random() > 0.5) {
> crit1 = true;
> } else {
> crit2 = true;
> }
This is literal cancer code that doesn't follow the problem.
>>
>>59915481
are you retarded?
>>
>>59909933
Holy shit people are retarded.
There are only 3 options.
crit/hit
hit/crit
crit/crit
Guess the probably 1 out of 3 is.
>>
>>59915481
 (Math.random > .5) // cannot be more optimized 
>>
>>59909933
>not using leagues crit algorithm

>something like for 3-5 make sure to follow one this pattern(x is a vrite base on 25% crit chance)

A A A X

A A A A X

A X A A A

This was literally there code for it u can even test it on leagye with a 25% crit chance it follows the same pattern
>>
>>59915370
Why did you turn it into a tree in the first place? What told you to give it order like that? Why didn't you use something like a key-value structure, where you know that the sum of the values is 2, and that we have a randomization function that generates either "crit" or "no crit", where the key-value structure starts "crit" off at 1, and "no crit" off at 0, and we generate the other number? That covers all of the clues in the question:

>enemy gets hit twice
sum of values = 2
>one hit is a crit
crit incremented to 1
>assume a 50% crit chance
function that produces either a crit or no crit equally as often
>>
>>59915201
>and he's wearing a helmet that gives him one critical hit per turn
This is the sticking point.

If you are guaranteed one crit, then not critting the first hit means the second hit will have a 100% crit chance.

But the problem stats to assume that the chance to crit is 50%, so you should not change the chance to crit on the case that you hit first but rather discard second hits.
>>
>>59909933
not even going to read the cancer but this is my answer.

hit = o, crit = x

there are only 3 possible scenarios which are:
ox
xo
xx

the answer is 33.33% or 1/3.
>>
File: 65465465.jpg (28KB, 400x400px) Image search: [Google]
65465465.jpg
28KB, 400x400px
I've been monitoring this thread since the beginning, and here's a TL;DR of what's going on:

There are three groups,
1. The 50%'ers. These people arrive at this conclusion because of the given information that one hit will always be a crit. They deduce that because of this information, the only thing left to chance is the non-crit hit. Essentially, they're excluding the BA... | AB, AA = 1/2

2. The 33%'ers these people are using Baye's theorem and conditional probability. That is, they are taking Hit and Crit and counting all the possible outcome -- AB, AA, and BA. They claim that because the hit that is crit is not specified the chance of two crits is reduced.

3. The 25%'ers these people's logic is guided by the presupposition that both hits can be non-crits so they're getting the extra possibility of BB. | AB, AA, BA, BB = 1/4

Please ctrl+f 25%, 33%, or 50% to read their arguments and come to your own conclusion. Also feel free to rank who's the most retarded. Good day.
>>
>>59915632
What group are you in?
>>
>>59912421
Even though I know this whole thread is bait, I can't enjoy it because I do think some of you aren't baiting.

>25%
WRONG: this is obvious bait. It would only be 25% if not for the gurantees critical for one of the hits. The probability of something with a 50% probability happening twice in a row is 0.5*0.5=0.25

>33%
WRONG: this is subtle bait or just responses from dumb people. These people think order matters in this scenario (spoilers: it doesn't).

We have the possible scenarios:
{C, H}
{H, C}
{C, C}

We know that one of the two attacks is already guranteed to be a critical so we can simplify by removing 1 Crit from each set:

{H}
{H}
{C}

The first two scenarios are the same!

{H}
{C}

Therefore, since 1 attack doesn't affect the other attack we can list the scenarios like that. Giving us 50% probability.

You can try this at home! Get a coin to flip. Find the probability of it landing on heads twice. But assume you've already flipped it and got heads once. Repeat this experiment where you flip a coin and pretend that you had already gotten heads. The probability of getting heads on your real trial is still 50%, only because one result is already guaranteed.
>>
>>59915632
Save yourself the time and just accept 50%. 25%ers didnt fully read the question and figured it as the probability of 2 crits. 33% people are trying to figure permutation for an equatiin where order was not desribed to have any significance, so a combination is assumed
>>
0.5*0.5 = 0.25
>>
i love these threads filled with autism its hilarious
>>
>>59915640
oh i'm just a friendly mediator
I'll let the readers decide
I mean the answer is pretty obvious to anyone who with average IQ
>>
>>59915650

You're the kind of person that would say the chances of rolling any two numbers on two 6-sided dies is 1 out of 6, you moron.

Your math and reasoning is so flawed as to make it laughable at best and not even worthy to be written on paper to wipe one's ass with.

It's 33%, deal with it.
>>
>>59910121
>>59910598
>>59911055
>>59911161
>>59911391
>>59911863
>>59912216
>>59913499
>>59914341
>>59915339

https://en.wikipedia.org/wiki/Boy_or_Girl_paradox

as you can see the question is ambigous and there are multiple interpretations

this is a semantic troll please sage this thread
>>
File: 1267872479327.jpg (61KB, 396x374px) Image search: [Google]
1267872479327.jpg
61KB, 396x374px
>>59915650
Are you fucking shitting me right now? 50% people are the biggest bait in this fucking thread.
>>
File: Rlogo.png (32KB, 200x155px) Image search: [Google]
Rlogo.png
32KB, 200x155px
>>59915675
yep
>>
>>59915650
>But assume you've already flipped it and got heads once.
That's wrong though.
>>
>>59909933
[CRIT notcrit]
[notcrit CRIT]
[CRIT CRIT]

1/3
>>
>>59915707
It's exactly like first question, it has very specific fucking anwser.
>>
>>59915707
It's not even semantically ambiguous. The specificity people are reading to get 50% is contrived. It's clear to anyone that can read that leaving out which hit was a crit was intended.
>>
>>59915650
>Get a coin to flip. Find the probability of it landing on heads twice. But assume you've already flipped it and got heads once. Repeat this experiment where you flip a coin and pretend that you had already gotten heads. The probability of getting heads on your real trial is still 50%, only because one result is already guaranteed.
I am going to fix your coin example, you can thank me later.

Take two coins.
Flip them in a way that you cannot see the outcome.
Someone tells you that at least one of the coins is heads.
What is the probability that both of the coins are heads?
>>
>>59915860
50% because you already know the outcome of one of the coins.
>>
>>59915860
I'm going to fix your coin example, you can thank me later.

A common street wizard-virgin hands you two coins and tells you that he wants you to flip them, and see how many heads you can get, then put both the coins into an ornate, mahogany box with two velvet coin slots. "BUT!", he says, "I'll take this one coin back, and it's going to be heads no matter what."

You are now free to flip the other coin. Then, when you've finished flipping the other coin, you can select which coin you fit into each slot because the order doesn't matter.
>>
File: chav-38187.jpg (33KB, 440x299px) Image search: [Google]
chav-38187.jpg
33KB, 440x299px
was the fate of this thread decided by the dubs in the OP? Well time to end it. The answer is 33% the dubs have spoken.
>>
File: 1492310288552.png (185KB, 500x475px) Image search: [Google]
1492310288552.png
185KB, 500x475px
50/50 theres no other solution
Its a logic problem not a math option same as monty hall
One hit always crits
Order doesn't matter
So that means the other hit is a 50/50
If it doesn't crit then the result is incorrect
If the second crits then it's positive
So
That means it's 50/50
You can't say "75" or anything that doesn't make sense
>>
>>59909933
I wish you go to school first and learn conditional probability. But most of you are too intelligent for school.
>>
>>59911055
>>59911155
Same dubs 100 apart
\thread
>>
>>59909933
>needing a program to know that it's 75%
>>
>>59916078
please tell us you got that answer
I just want to laugh at you
>>
>>59916092
Simple logic you dumbass.
>>
>>59916097
>logic
lul
reveal your logic process smart guy please enlighten me
>>
>>59916119
If you can't figure out that it's 75 you are literally retarted.
>>
>>59909933
1/2
>>
>>59915945
>not rolling for 33
Come on, at least roll your dubs well.
>>
>>59916196
the answer was in the OP's dubs all along.
>>
>>59916092
H H is a valid possibility that isn't an acceptable outcome in this case.
The chance to crit is to be assumed to be 50%, so we cannot change the possibilities of any of the outcomes.
We know that in this case of two hits that at least one is a crit.

The acceptable outcomes are
H C
C H
C C
and are all equally possible, because chance of C must be 50%.
All we know is that it isn't H H.
>>
>>59916246
Did you read the question? It asked for the probability of both hits being crits.
>>
File: 1441677249546.png (1MB, 1634x1903px) Image search: [Google]
1441677249546.png
1MB, 1634x1903px
>>59916246
if i assumed that there is one crit everytime then theres a 50% chance the next one or before that is a crit

so 50% to be double crits

but if didnt assume which one crits, either the first or second one then theres three possible outcomes which in turn gives me a 1/3 chance a double crit happening

so a 33% chance a crit happening

there literally two answers to this shit because of the ambiguity of the question
>>
>all the brainlets in this thread
I can't tell if it's just bait, but would certainly explain why all posts in this board are retarded
>>
>>59909933
Goddammit
You have this set of outcomes:
Crit,hit
Crit crit
Hit crit.

Count them.
>>
>>59916394
but i have a guaranteed crit already, should i just calculate the probability that the next one or before that is not?
>>
Its already 50% with one being crit already.

The second has 50% chance of being crit.

If it crits, then it becomes 100% crit for both
If it doesn't crit, then it stays 50% for both.

So (100+50)/2 = 75% chance.

Why is this so hard?
>>
>>59916296
Did you read my post? You should be able to infer the probability I conclude form it.

>>59916413
You don't know if the crit was the first hit or the second, all you know is that one of them is a crit, and that crit passed the 50% roll (it wasn't guaranteed).
>>
>>59916476
>and that crit passed the 50% roll
Maybe it didn't even roll, and was simply made a guaranteed crit without a roll, 100% crit rating + 50% crit rating
>>
>>59916507
>Maybe
And maybe we can add more things to the problem, like a magical elf helping you get crits.
>>
You hit an enemy twice. At least one of the hits is a crit. Assuming a 50% crit chance, what is the probability both hits are crits?

Sentence 2 states:At least one of the hits is a crit.

We are only looking at situations where at least one hit is a crit. This is why all noncrit/noncrit scenarios are discarded. In other words, we are trying to find the probability of getting 2 crits given that 1 crit has occurred. This is a conditional probability problem which can be defined as:

P(A|B) = P(A ∩ B)/P(B)(Eq. 1)

Where A = 2 crits and(S1)
Where B = at least 1 crit(S2)

To find the solution to Eq. 1 we must first find the value of P(A u B) and P(B).

Finding P(B)
Let C = crit
Let N = no crit

Table 1: Total possible outcomes for 2 hits
NN
CC
NC
CN

P(B), as defined in S2, is the probability of at least 1 crit. Referencing Table 1, the following instances represent at least 1 crit: CC, NC, CN. These 3 combinations are out of a total of 4 possible combinations.

Therefore P(B) = 3/4

Finding P(A ∩ B)

Liken events A and B to be a venn diagram. A and B only intersect (satisfy both events) in 1 situation: when there are 2 crits. Referencing Table 1, the following instance represents 2 crits: CC. This combination is out of a total of 4 possible combinations.

Therefore P(A ∩ B) = 1/4

We can now solve Eq. 1.

P(A|B) = P(A ∩ B)/P(B) = (1/4)/(3/4) = .33
>>
>>59909933
return .5;
>>
1.Both hits crit
2.One hit crits
3.None of the two hits crit
We eliminate the third event, since the problem states that at least one hit will always crit. 1/2 = 50%.
>>
Kek 50%
>>
>>59918690
Wait, there is actually 4 events. It's 1/3 then.
>>
>>59910621
This is correct. 50%.
>>
>>59909933
50% if order doesn't matter,
25% if order matters

kys pajeet
>>
itt: idiots who need to study discrete mathemathics
>>
>>59916413
You have no idea if guaranteed crit is first, or second.
>>
>>59918811
This literally doesn't make any sense. If both needs to be crits, then how can order make a difference? Either both are crits or one isn't a crit. The chance per shot is 50% and one shot is always a crit. Ergo, chance of both crits = 50%.
>>
>>59918886
order/combinations are a really big part of probability theory and makes all the difference from when the order doesn't matter

or was your question why order matters OP's question? I dunno, so I gave the solution in either gave
>>
>>59918953
case
>>
>>59918811
oh and I meant 1/3 if order matters not 1/4 :~)
>>
>>59918953
>or was your question why order matters OP's question?
Yes.
>>
>>59918972
well it's intentionally vague, so who cares about guessing what was meant

also
>thinking in absolutes
lmao
>>
50% means that both crit and non-crit are equally probable, exactly like in a coin toss, thus it gives us the following set {(N,N),(N,C),(C,N),(C,C)}, with each having 25%
>>
No worries fellow rich americans, i will soon provide you a highly accurate simulation made in java.
>>
>>59919001
We don't need it, just read >>59916612
>>
>>59918991
>At least one of hits is a crit.
Didn't see that earlier.

It's as if the first coin toss is always heads, so it's 50% that next coin toss is heads too.
>>
File: IMG_0481.jpg (48KB, 900x900px) Image search: [Google]
IMG_0481.jpg
48KB, 900x900px
ORDER DOESNT MATTER
ORDER DOESNT MATTER
ORDER DOESNT MATTER
ORDER DOESNT MATTER

It is 5O%
For your attack that isn't the one guaranteed to Crit, it can either hit or Crit! 50%
>>
>>59919026
>It's as if the first coin toss is always heads, so it's 50% that next coin toss is heads too.
But we don't know which hit is a crit, as if we don't know which coin toss is heads.

We have no knowledge of which in the set is a crit, thus the only path you can eliminate is the path with both hits, leaving three equal possibilities because the chance to crit is always 50%.
>>
>>59919012
that's just another solution from mere human. what makes it more right than all other solutions in this thread? although, i agree that it is the right answer.
>>
its 50%

you have

crit crit
crit crit
hit crit
crit hit

2 of those are both crits, 2 are not.

fuck /g/ is retarded
>>
>>59919192
>that's just another solution from mere human. what makes it more right than all other solutions in this thread?
Actual math based on conditional probability, which this is an example of.
The outcome of the program can be anything depending what the programmer puts into it, which is why we already have several examples in this thread showing three different outcomes.
>>
>>59919313
>implying order matters
>>
roboasianiggerstani here,

you have to break the question down to its simplest form white boys.

crit chance is 50%
2 hits, 1 is always a crit, what's the chance that both hits are crits?

1 hit is always a crit so you can remove that and the question becomes

crit chance is 50%
what are the chances of this hit being a crit?
>>
File: 1461584353198.jpg (133KB, 800x1067px) Image search: [Google]
1461584353198.jpg
133KB, 800x1067px
>>59919313
>crit crit
>crit crit
inb4 merely pretending
>>
You only get a One more! If the first hit is a crit so 50% chance
>>
Holy fuck in not sure if you guys are dumb or trolling.
It's 33%. If you're saying anything else you don't understand basic probability theory.
>>
>>59919353
33%
>>
>>59919313
>first can be a crit and second can be a crit
>first can be a crit and second can be a crit
>first can he a hit and second can be a crit
>first can be a crit and second can be a hit

>fuck /g/ is retarded
>>
>>59919447
what's the chance of 2 hits being crits?
50%
why would this chance lessen because one of those hits is already a confirmed crit?
>>
If you always hit ONE shot then its a 100% on at least one shot, the other shot, either 1st or 2nd, is still 50% chance
You have to multiply both probabilities getting 1*0.5 = 0.5
Consider this, if you toss a coin 2 times and you know you will get tails on one toss, whats the probability of getting tails on both?
>>
>33%
Retards think one both hits are 50%.

>50%
Retards didn't read OP's premise correctly.

>75%
Pure Kino race. (100% + 50%) / 2 = 75%.
>>
>>59919877
is this that expanding brain meme?

>66%
is true gods

none of those 3 actually make sense, the 33% fags are the worst
>>
>>59919980
50% is true
25% makes sense if you dont read carefully
33% and 75% is just american education tier
>>
>>59909933
return 0.33
>>
>>59920093
. 33 is the legit, fuck how is it American
>>
>>59919825
Let's represent crit by 1 and regular hit with 0.
They have a 50% chance, so all scenarios are all equally likely.
0 0
0 1
1 0
1 1
all have 25% chance of happening.

now we know at least one of them has to be a critical hit, so we can remove the first option.
0 1
1 0
1 1
This means a 33% chance.
>>
>>59920447
11 can happen in two ways. your not counting that
>>
>>59920447
actually it would look like this

1 0 =50%
1 1 =50%

= 50%
>>
File: split.png (1KB, 94x137px) Image search: [Google]
split.png
1KB, 94x137px
>>59920543
You have two separate events. The order does not matter.
So you don't have to wait for the first hit to be critical before you test on the second.
One of the hits have to be critical.
0 1 is a possibility.
>>59920530
pic related
>>
i've run a simualtion and the results yield ~25% chance of both shots critting in 10000 iterations.
picrelated is the code.
>>
>>59920838
wrong, also java is such a cluster jesus christ
>>
>>59920953
what is wrong? tell me and i'll fix it.
>>
File: Screenshot (14).png (4KB, 610x68px) Image search: [Google]
Screenshot (14).png
4KB, 610x68px
>At least one of the hits is a crit
means one is already a crit
>At least one of the hits MUST be a crit
implies to look for the chance one of them is a crit
>>
File: Screenshot (15).png (3KB, 604x59px) Image search: [Google]
Screenshot (15).png
3KB, 604x59px
>>59920965
shit i fucked up
>>
>>59920838
your code is wrong because checks if both are misses and then changes one miss to crit, which gives 01 or 10 as output, increasing their probabilities to 0.25 + (0.25/2) but not 11 which is still 0.25
OP image clearly says one shot is ALWAYS a crit, there lies the hardship if the code and the problem itself
>>
>>59920447
false, you are not removing an option, you are playing without it
10 == 01 since at least one shot is crit
So 11 is 0.5 meanwhile 10 and 01 are 0.25 each
>>
>>59921186
01 and 10 is two separate cases even though the outcome is the same.

00 is just as likely to happen even though you are "playing without it"
You have 4 cases that have the equal chance of happening.

What you are claiming is that the 4 cases are:
01
11
10
11
which makes sense if there is 100% chance of one of them being crit and 50% of the other of being crit, but that is not the rules stated in the OP.
The rules stated that both hits had 50% chance, but only cases where one hit was critical was looked at.
>>
>>59909933
C = crit
N = no crit

possibilities when hitting an enemy twice are

NN
NC
CN
CC

At least one of the hit is a crit, so NN is out.

NC
CN
CC

Chance is 1/3.
>>
order doesn't matter you idiots, its only "chance both crit".
since we know that one will crit for sure, that only leaves the other one: so its 50%

it doesn't matter if its the first or the second.
Thread posts: 326
Thread images: 31


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.