Jump to content

Not strictly a php problem...


Hailwood

Recommended Posts

 

so guys,

im making an application and i need to know how to solve a problem such as below.

can someone please solve this and post how to do so, or even just how to do so.

Cheers.

 

 

it is literally the maths i am stuck on.

extracting the relevant parts i have done.

 

12% of voters in a recent election voted on the greens candidate,

if 10 people were randomly selected

what is the probability that exactly 4 people voted for the green candidate.

Link to comment
https://forums.phpfreaks.com/topic/199140-not-strictly-a-php-problem/
Share on other sites

A more logical view:

10 blues in a bag of 100.

take ten, the chance would be 1 out of ten for being blue.

 

for 2 blues it would be a 0.5 chance..

4 blues would be 0.25.

 

SO..:

12 A(s) in 100.

1.2 A(s) in 10.

/ 4 = 0.3 in 10.

 

Sorry this is doing my head in..

? You just divide the chance... Hmmm I should pay more attention to math.

It's really a simple math, that is, if I understand it correctly.

 

12% of voters vote green

10 people

Find P(exactly 4)

 

Exactly 4 = 4 vote green, 6 vote others

 

So, X ~ Binomial(10, 4). 4 with probability .12 and 6 with probability .88.

 

From that, we have this - [tex]\binom {10} {4}\cdot(.12)^4\cdot(.88)^6 = .02 = 2\%[/tex]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.