redfiona99: (Default)
I start with a statement saying that I am not a statistician. I am merely an amateur number cruncher. If anyone spots any mistakes or bits that could be clarified, please tell me.

Sorry [personal profile] ioplokon for this taking so long. The main problem was I was making it over-complicated, so I went back to basics.

For the purpose this example, imagine we are testing to see if using drug A improves cure rates compared to the standard of care. It's a very early trial so we're only going to test it on 10 patients. So that's 10 patients being treated with A and 10 patients being treated with the standard of care (this is your control arm).

1 - Despite what you've heard, most clinical trials do not test against a placebo. They test against standard of care. New drugs have to be as good as what's already out there.

The hypothesis we are testing is: Drug A is better than the standard of care in disease x.

2 - If someone ever tries to blind you with stats, make them tell you what their hypothesis is. If there isn't a hypothesis, the hypothesis is not testable or what they're doing will not help to test the hypothesis, they are trying to bamboozle you.

So we run our experiment. 6 patients in the drug A arm are cured, while 5 people in the control arm are cured.

Is that a real difference, or could that have happened by sheer luck?

I mean, obviously, we’ve tried to make the two groups of patients as similar as we could in terms of disease stage and physical condition but we could have missed something important that makes one person more responsive to treatment than another and therefore not fully or properly balanced the groups.

We are going to use stats to try answer that question.

What statistical significance tells us is "what is the chance that this result is real and not just sheer luck?" So if something is significant to p=0.1, there is a 1 in 10 chance that this result is sheer luck. In science, we say something is statistically significant if p ≤0.05. That means that there is a 1/20 or less chance of the result being due to luck.

3 - Statistical significance does not mean a result is true/real, it means it is unlikely to be due to random chance.

When we run a test of this data, we are trying to disprove the null hypothesis. The null hypothesis is "the hypothesis that there is no significant difference between specified populations, any observed difference being due to sampling or experimental error."

First, we need to know the degrees of freedom in the data. The equation for this is: DF = k - 1
or Degrees of freedom = categorical variables - 1.

In this example, there are two categorical variables, cured and not cured, so the degrees of freedom is 1.

Next we need to work out the expected value for the data. There is a proper equation for this (please see here) but we have a pre-built expected in the control population. The expected number of people cured is the number cured in our control population so our expected value is 5.

We now work out the test statistic, χ2 = ∑[(Oi - Ei)2 /Ei]

∑ is the sum of, O is the observed, E is the expected.

Or, we square (the observed - the expected) then divide it by the expected. We repeat this for the cured patients and the not cured.

In our case, for the cured the observed is 6 and the expected is 5.

So (6-5) = 1

1 squared = 1

1/5 = 0.2

For the not cured, the observed is 4 and the expected is 5.

So (4-5) = -1

-1 squared = 1

1/5 = 0.2

Adding 0.2 for the cured patients, and the 0.2 for the not cured patients gives 0.4.

We then take that value and look it up on a chi squared table. Do not worry about the length and size of the table. The rows are labelled with degrees of freedom. The degree of freedom in our example is 1, so we are interested in the first row.
Go across this row from left to right until you hit the number two, then look up to the top of the column to read the associated p value.

In our case, a p value of 0.4 lies between a p value of 0.975 and 0.2. As both of these values are higher than 0.05, we can't discard the null hypothesis, or, to put it in plainer English, the result of the experiment, where the new treatment had 6 people cured, while the old treatment had 5, could have been due to sheer luck. We cannot say that the extra cured person was due to the new treatment.

Now, as you can imagine, with more complicated numbers, the maths can get a bit tricky, so there are online calculators, I tend to use this one - https://www.socscistatistics.com/tests/goodnessoffit/Default2.aspx

On the first page, our two categories are cured and not cured. The observed cured is 6, so the observed not cured is 4. Our expected, the value from our control is 5 and 5 and we're looking at a 0.05 significance level.

The programme returns a result for us and says "The Chi^2 value is 0.4. The P-Value is 0.527. The result is not significant at p=0.05."

Which means exactly the same as the by-hand version. We can't say that new treatment was the reason why the extra person in the "new treatment" cured was compared to the old treatment.
redfiona99: (Default)
Business:

Christian Dior boss: Fashion success through reinvention - http://www.bbc.co.uk/news/business-38611409 Ignore the title, it's actually about female bosses in the fashion industry

Design:

The Type Snob: And how to turn into one - https://thedesignteam.io/the-type-snob-f221969a884b

Economics:

Will Finland's basic income trial help the jobless? - http://www.bbc.co.uk/news/world-europe-38593513

Food:

When fast food gets an Indian twist - http://www.bbc.co.uk/news/world-asia-india-38633567

History:

Why was the Zimmermann Telegram so important? - http://www.bbc.co.uk/news/uk-38581861

Mathematics:

Making sense of principal component analysis, eigenvectors & eigenvalues -https://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues/140579#140579 Or the PCA primer I have been looking for for years.

Media:

How To Use Facebook And Fake News To Get People To Murder Each Other -
https://www.buzzfeed.com/jasonpatinkin/how-to-get-people-to-murder-each-other-through-fake-news-and?utm_term=.lwa76O25d#.pqN4JpvZV

Miscellaneous:

The commuters who enjoy being creative with their time - http://www.bbc.co.uk/news/uk-england-38506378

'I'm allergic to my husband' - http://www.bbc.co.uk/news/magazine-38507160

The defeat of Davos: Are the global elite in retreat? - http://www.bbc.co.uk/news/business-38632145

Protect, Serve And Take Care Of The Bees - https://www.npr.org/2017/06/02/531048619/protect-serve-and-take-care-of-the-bees

Music:

7 hit songs you probably didn’t know were originally written for other people -
http://www.bbc.co.uk/programmes/articles/3zvW0JQ1HfCYXHQBKbzpWy9/7-hit-songs-you-probably-didn-t-know-were-originally-written-for-other-people

News:

May can think big all she likes. Britain’s about to find out just how small it is - Rafael Behr - https://www.theguardian.com/commentisfree/2017/jan/17/theresa-may-britain-prime-minister-speech?CMP=Share_AndroidApp_Tweet From January

The problem with the English: England doesn’t want to be just another member of a team -
http://www.theneweuropean.co.uk/top-stories/the-problem-with-the-english-england-doesn-t-want-to-be-just-another-member-of-a-team-1-4851882?platform=hootsuite From January

A full English Brexit is on the menu - https://blogs.spectator.co.uk/2017/01/full-english-brexit-menu/ From January

Politics:

Enhancing the EU’s Engagement With Separatist Territories - http://carnegieeurope.eu/2017/01/17/enhancing-eu-s-engagement-with-separatist-territories-pub-67694 From January

Why do Indians vote for 'criminal' politicians? - http://www.bbc.co.uk/news/world-asia-india-38607255

Science:

Study uses bacteriophages to treat livestock as an alternative to antibiotics -
https://www2.le.ac.uk/news/blog/2017-archive/june/study-uses-bacteriophages-to-treat-livestock-as-an-alternative-to-antibiotics

Sport:

Snooker:

Mark Selby interview: 'I don't bottle it, that's why I've spent 100 weeks at number one' -
http://www.eurosport.co.uk/snooker/the-masters/2016-2017/mark-selby-interview-i-don-t-bottle-it-or-give-up-that-s-why-i-ve-spent-100-weeks-at-number-one_sto6018251/story.shtml From January

Technology:

The Secrets of LinkedIn - https://webbreacher.com/2017/01/14/the-secrets-of-linkedin/

Can your voice reveal whether you have an illness? - http://www.bbc.co.uk/news/business-38637257

The hidden strengths of unloved concrete - http://www.bbc.co.uk/news/business-38317186

Links

Nov. 26th, 2017 03:25 pm
redfiona99: (Default)
Language:

5 Russian words that explain Vladimir Putin - To understand the man, you need some Russian (and history) lessons. - https://www.politico.eu/article/five-russian-words-that-explain-vladimir-putin-in-2017/

Maths:

Was 2016 especially dangerous for celebrities? An empirical analysis. - https://medium.com/@jasoncrease/was-2016-especially-dangerous-for-celebrities-79d79b9fae02

Miscellaneous:

“Architecture saved my life”: Pablo Escobar’s son is a good architect now -
https://archpaper.com/2017/01/pablo-escobar-son-architect/

The Bush sisters wrote this touching letter to Sasha and Malia Obama -
http://www.bbc.co.uk/newsbeat/article/38611031/the-bush-sisters-wrote-this-touching-letter-to-sasha-and-malia-obama From January

Brazil prison riots: What's the cause? - http://www.bbc.co.uk/news/world-latin-america-38534769

Falling in love in wartime Iraq - http://www.bbc.co.uk/news/magazine-38506269

Drenched Thailand still waiting for its green revolution - http://www.bbc.co.uk/news/world-asia-38559206

The simple steel box that transformed global trade - http://www.bbc.co.uk/news/business-38305512

Young Russians born this decade face complete smoking ban -
http://www.bbc.co.uk/newsbeat/article/38571174/young-russians-born-this-decade-face-complete-smoking-ban Well that's one way to do it.

How to nap successfully at work - http://www.bbc.co.uk/news/business-38498488

Music:

TripAdvisor Reviews of the Hotel California - https://medium.com/how-pants-work/tripadvisor-reviews-of-the-hotel-california-9395cde3b391 I laughed long and hard

Politics:

Why Brexit is still undefined - http://www.bbc.co.uk/news/uk-politics-38558056 This is from January. Guess what's still undefined now.

Science:

Recruiting prawns to fight river parasite - http://www.bbc.co.uk/news/science-environment-38571937

New candidate for 'missing element' in Earth's core - http://www.bbc.co.uk/news/science-environment-38561076

Sport:

Sporting photos: 11 of the best from Getty exhibition - http://www.bbc.co.uk/sport/40175719

Football:

Personal letters show how Graham Taylor always had time for fans -
http://lebuzz.eurosport.co.uk/viral/personal-letters-show-how-graham-taylor-always-had-time-for-fans-24116/?_ga=1.119693064.1411550946.1484310872

‘Dear eight-year-old Ronaldinho’ – Brazil legend pens emotional letter to his younger self -
http://lebuzz.eurosport.co.uk/viral/dear-eight-year-old-ronaldinho-brazil-legend-pens-emotional-letter-to-his-younger-self-24044/?_ga=1.83602774.1121939160.1484132031

Last man standing: A tribute to Gary Cahill - Gary Cahill is the last starter to have survived the cull that ensued following the Champions League triumph in Munich - http://www.eurosport.co.uk/football/premier-league/2016-2017/last-man-standing-a-tribute-to-gary-cahill_sto6006312/story.shtml

Rugby Union:

Dave Pearson: Rugby players 'need more protection', says ex-referee - http://www.bbc.co.uk/sport/rugby-union/38564669

Technology:

'Sweating bullets' - The inside story of the first iPhone - http://www.bbc.co.uk/news/technology-38552241

Links

Jun. 3rd, 2014 07:05 pm
redfiona99: (Thinking)
Brazil's other passion: Malba Tahan and The man who counted - http://www.bbc.co.uk/news/magazine-27254747

Michael Buffer 'ready to rumble' - http://www.bbc.co.uk/sport/0/boxing/27517733

Lasers 'could prevent' need for root canal treatment - http://www.bbc.co.uk/news/health-27595573 For those of us with dental issues.

1964: The World 50 Years Ago - http://www.theatlantic.com/infocus/2014/05/1964-the-world-50-years-ago/100743/ Via @TwistedSifter on twitter.

The real 10 algorithms that dominate our world - https://medium.com/tech-talk/the-real-10-algorithms-that-dominate-our-world-e95fa9f16c04 Rebuttal to the Reddit article on the same topic. This one actually explains the whys and whats of algorithms. Via @TwistedSifter on twitter.

50 Cent Is My Life Coach - http://www.gq.com/entertainment/celebrities/201406/50-cent?currentPage=all This is interesting because 50 Cent is nothing like how you imagine him. Via @TwistedSifter on twitter.

Wim Wenders' Rules of Cinema Perfection - https://www.youtube.com/watch?v=YZqrFlFPvJE

African teams can't defend? Common cliches examined → http://www.bbc.co.uk/sport/0/football/26463286 Most of the cliches are not so true. England do, however, suck at penalties.

An up-to-date and updated throughout list of who is injured for which team for this World Cup - http://www.physioroom.com/news/worldcup_2014/injury_table.php

Some lovely posters ESPN commissioned for the World Cup - http://www.espnfc.com/blog/world-cup-central/59/post/1834728 One word of warning. Apparently the Cyrillic is all kinds of wrong.
redfiona99: (Thinking)
Based on something that happened to me in RL.

We have 3 cards, marked E, S and F. They are drawn 8 times. What is the probability of the draw being:

1 - E, S, F
2 - E, S, F
3 - S, E, F
4 - E, S, F
5 - S, F, E
6 - E, S, F
7 - S, E, F
8 - S, F, E

Now they were all supposed to be independently drawn, so I think I have to add the probability of each independent draw rather than multiplying them. What's confusing me is whether or not each line is 1/3 x 1/2 or whether I have to take into account the probability of the first pick when I work out the probability of the second pick.

(In case anyone is wondering what the RL scenario was, it was the running order for weapons in a match, randomised so no-one would have an advantage. I just want to know why Lady Luck kept putting me (Foil) on last.)

Profile

redfiona99: (Default)
redfiona99

June 2025

S M T W T F S
12 34 56 7
891011121314
15161718192021
22232425262728
2930     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 8th, 2025 08:22 pm
Powered by Dreamwidth Studios