Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Ron McLeod
• Paul Clapham
• Rob Spoor
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• Junilu Lacar
• Tim Cooke
Saloon Keepers:
• Tim Holloway
• Piet Souris
• Stephan van Hulst
• Tim Moores
• Carey Brown
Bartenders:
• Frits Walraven
• Himai Minh

# need math help for new program logic

Rancher
Posts: 159
5
• Number of slices to send:
Optional 'thank-you' note:
hello!
I want to write a programm which check this symptoms to calculate the probability of corona- infection.
Symptom%
Fever87.9%
Dry cough67.7%
Fatigue38.1%
Sputum production33.4%
......
Diarrhoea03.7%
Haemoptysis00.9%

How it would be correct to calculate it?
photo_2020-03-15_20-47-15.jpg

Mike Savvy
Rancher
Posts: 159
5
• Number of slices to send:
Optional 'thank-you' note:
Would such calculation be correct? I think not because if I have only fever and nothing other it means directly 88% what is not looks like truth
corona.png

Marshal
Posts: 26750
81
• Number of slices to send:
Optional 'thank-you' note:
Is that supposed to mean "Probability of CV given Fever is 87.9%" and "Probability of CV given Fatigue is 38.1%"? Those are conditional probabilities, and there are rules for computing with those probabilities.

But you seem to be disputing the numbers themselves. Which is fine, "Garbage In, Garbage Out" as we say, but if you dispute them then there's no point calculating with them.

Marshal
Posts: 73738
332
• Number of slices to send:
Optional 'thank-you' note:

Mike Savvy wrote:Would such calculation be correct? I think not . . .

No. If 88% of people with Coronavirus have a fever, that doesn't mean that 88% of people with a fever have Coronavirus.

Bartender
Posts: 2880
150
• Number of slices to send:
Optional 'thank-you' note:

Campbell Ritchie wrote:... No. If 88% of people with Coronavirus have a fever, that doesn't mean that 88% of people with a fever have Coronavirus.

This falls under the fallacy: I love y therefore y loves me ;)

Also unrelated to the topic ... I'm kind of skeptical as how an excel sheet with a few binary fields can diagnose a disease. Personally, percentage is not a good metric to tell me if I have a disease or not.

Paul Clapham
Marshal
Posts: 26750
81
• Number of slices to send:
Optional 'thank-you' note:

Campbell Ritchie wrote:If 88% of people with Coronavirus have a fever, that doesn't mean that 88% of people with a fever have Coronavirus.

Exactly. And there's no math which will tell you what is the right number instead of 88%.

Saloon Keeper
Posts: 4611
182
• Number of slices to send:
Optional 'thank-you' note:
Do you also want to answer questions like: this person has Fever AND is also coughing, what chance he has to have Corona's disease?

Campbell Ritchie
Marshal
Posts: 73738
332
• Number of slices to send:
Optional 'thank-you' note:

Paul Clapham wrote:. . . there's no math which will tell you what is the right number instead of 88%.

There might be such figures available, but if Coronavirus cases are multiplying, those percentages will change from day to day.

 Being a smart alec beats the alternative. This tiny ad knows what I'm talking about: the value of filler advertising in 2021 https://coderanch.com/t/730886/filler-advertising