Problem Solving - Computer Science 101

advertisement
DAY 2:
THE SCIENTIFIC METHOD
AND CRITICAL THINKING
Rohit
rorohit@mix.wvu.edu
August 19, 2015
1
THE SCIENTIFIC METHOD
2
PROBLEM SOLVING
• Problem solving is the process of
analyzing and finding solutions for
questions that we want to solve.
• How do we perform problem solving?
– One way is with the scientific method, the
process by which scientists, collectively over
time, endeavor to construct an accurate
representation of the world.
3
SCIENTIFIC METHOD
• 4 major components
– Observation
– Hypothesis
– Prediction
– Experiment
• 1 evaluation step
– Decision
4
SCIENTIFIC METHOD PROCESS
theory
Consistent
observation
hypothesis
If everything is
consistent, advance
hypothesis into
theory.
predictions
Inconsistent, edit
hypothesis
tests
If not consistent,
modify
predictions and
test again.
5
OBSERVATION
• Areas of interest in which one sets out to
prove truth or faults.
• What kind of observations can you think of?
– The average temperature of the earth is rising.
– Foreign-made cars have been gaining market
share in the United States.
– People from the southern US tend to be more
tanned than those in the northern part of the US.
6
OBSERVATION IN-CLASS
EXAMPLE
• An example of an observation might be:
– You work for a computer manufacturer. The
latest model, the X900, is selling very well.
– You wish to explore this observation and find
out the reason for the strong sales.
7
HYPOTHESIS
• Suggested explanation of problem or
observation
• How do we get hypotheses?
– From other branches of science
– Informed guesses
– Random ideas
8
HYPOTHESIS IN-CLASS
EXAMPLE
• What hypotheses might explain the sales of the
X900?
– Looking at marketing data per year, the amount spent
on Internet advertising appears to be higher the year
this computer was introduced.
• Hypothesis: the increased sales were the result of the
increase in Internet advertising.
– This computer was the first to use the latest graphics
card, the Screamer 9200.
• Hypothesis: the increased sales were the result of using the
latest graphics card.
9
PREDICTION
• Formal way to put a hypothesis to the test.
• If the hypothesis is true, when x is
manipulated, then y should happen.
– x is the independent variable: it's the thing
changed.
– y is the dependent variable: its value depends
on x.
10
PREDICTION IN-CLASS
EXAMPLE
• What predictions could you make based
on the data we have?
– If a greater amount is spent on Internet
advertising, computers will sell better.
– Using the latest components will increase
sales.
11
EXPERIMENT
• Test hypothesis to see if it’s correct.
– Lab experiment (grow cultures in petri dish)
– Analyze current data using computer applications
(Access, Excel)
• First hypothesis may not be correct
– If so, no problem: go back and change it
• May not be possible to completely prove or
disprove a hypothesis
– Example: Can’t completely prove or disprove whether
cell phones cause driving accidents
– What do we do in that situation?
12
EXPERIMENT IN-CLASS
EXAMPLE
• What can we do with our data to test the
hypotheses?
– Graphics card hypothesis
• Run a query on the components table. Group the data by
graphics card type. Do the units sold tend to be higher for
certain cards?
• Export this data into Excel and graph it, with units sold on the y
axis, and the component name on the x axis, for each
component type. Is there a pattern?
– Internet advertising hypothesis
• Run different sorts, by each advertising type, then by year.
Does there seem to be a pattern?
• Export this data into Excel. Graph each expenditure type on the
y axis, and the year on the x-axis. Fit a trendline to the data, and
forecast it out a few years. Is a pattern visible now?
13
DECISION
• Reject or accept the prediction(s).
• If the hypothesis appears correct, you can create
a new hypothesis, and begin again.
– Would this hypothesis apply to other, similar cases?
• If it seems incorrect, reformulate and try again.
• Remember correlation doesn’t equal causality!
– When the sun rises, the sky gets light. Does sunrise
cause a blue sky? Yes!
– People who don’t wear seat belts tend to have worse
accidents. Does one cause the other? Only partially!
– Tall people usually weigh more. Does height cause
weight? No!
– In each case, though the first and second are related,
it’s not necessarily true that one causes the other.
14
DECISION IN-CLASS EXAMPLE
• A sharp increase in the percentage of Internet
advertising the year the X900 was introduced
was the reason for its increase in sales.
– Look at other computers introduced that year to get a
better idea if this is correlation or causality.
• The use of the Screamer 9200 was the reason
for the X900’s success.
– Again, correlation vs. causality: check out other
computers that use the new card to see which one is
the case.
15
CRITICAL THINKING
16
CRITICAL THINKING
• Definitions:
– The scientific method applied to life.
– An attempt at objective judgment so as to
determine both merits and faults.
– The art of taking charge of your own mind!
17
NON-CRITICAL THINKING
• Left to our own devices, our thinking often
uses rigidity, over-generalization,
prejudice, and common fallacies.
– Voting a certain way because that's the way
your parents did (or didn't!)
– Buying a brand new car because it looked
good on the lot.
– Copying/pasting in Word using a mouse
because that's the way you've always done it.
18
WHY USE IT?
• Objectively arriving at a decision (the purpose of
critical thinking) has many benefits.
– Cheaper (you’ll buy less frivolous/needlessly
expensive things)
– Healthier (more likely to exercise, spot doctor
mistakes)
– Better grades (critical thinking = better study habits!)
– Higher pay (critical thinking is invaluable in finding
and keeping a great job)
19
CRITICAL THINKING IN CS101
• Is there a faster way to do the task I’m doing
than the way I already knew?
– Shortcut keys, icons, etc.
• How do I use Microsoft Office to answer the
critical thinking questions?
–
–
–
–
Access: sorting/grouping with queries
Excel: graphing, scenarios, PivotTables
PowerPoint: organizing ideas effectively
Word: getting ideas down on paper makes them
clearer
20
CRITICAL THINKING IN SCHOOL
• When studying, turn section titles into
questions, and use that section’s text as a
chance to answer that question
– If the section is titled “Formatting Spreadsheets in
Excel, ask yourself “How do I format
spreadsheets?”, and look for the answers as you
read.
• Do extra review questions at the end of
chapters.
• At the end of each lecture, take one minute,
and answer the following (try this now!)
– What’s the most important thing I learned today?
– What’s the thing I’m still most confused about?
21
CRITICAL THINKING IN LIFE
• When trying to decide whether to buy something
– Do I really want/need it?
– Can I afford it?
– Is it good (healthy, non-dangerous) for me?
• When voting
– Familiarize yourself with the issues.
– Think about the long-term implications of your choice.
• At the doctor
– Ask questions.
– Get a second opinion.
22
Download