From Liquipedia Starcraft 2 Wiki
Settings particular to the computer mouse are critical to Starcraft 2 gameplay. The various settings can be confusing to understand, so this article has been created to elucidate what each setting means and how changes affect gameplay. This is particularly important to computer gamers that play on tournament or LAN computers and must adjust settings to personal taste quickly.
DPI/CPI essentially defines the sensitivity and speed of the sensor. The correct term for this aspect is actually CPI, or counts per inch. DPI, or dots per inch, is a term that refers to printing resolution which has been incorrectly associated with mice. DPI is now used by most mouse manufacturers to refer to the counts per inch of their sensors. Both terms refer to exactly the same thing and are often used interchangeably.
The DPI/CPI of a mouse roughly correspond to the amount of pixels the cursor will move when the mouse is moved one inch. The higher the DPI, the quicker the cursor will move across the screen when the mouse is moved. DPI is related to the FPS (frames per second) as well as the internal memory and speed of the sensor. However, in general, the higher the FPS of a mouse, the higher the DPI.
Basically a higher DPI is going to give you faster cursor speed without sacrificing any precision. When you turn up the sensitivity in Windows or in games, this increases the speed of the cursor but reduces the accuracy of the mouse. Increasing the sensitivity this way causes Windows or the game to take the number of pixels the cursor should have moved and multiply it. This has the effect of making it so there are certain columns of pixels on the screen that the mouse cursor is unable to land on. For example if you multiply everything by two, you'll never get an odd number. Same principle applies for mouse sensitivity. The only way to change cursor speed without affecting the precision is to modify the DPI of the mouse; this is why most mice on the market include "on the fly" DPI switching, usually via a button on the top of the mouse that switches between several set DPIs. Other mice like the Steel Series Xai can be setup with several different custom"profiles" that the user can switch between. Most gamers tend to prefer lower DPI for first person shooter games and higher DPI for RTS and Moba games, though this is subject to personal preference.
Because DPI is based on pixels, monitor resolution also plays a role in the sensitivity of a mouse. A 1000DPI mouse will roughly move the cursor 1000 pixels across the screen when the mouse is moved one inch. On a monitor running 1024x768 resolution, moving the mouse 1 inch horizontally will essentially move the mouse from one side of the screen to the other. On a 1920x1080 monitor, the cursor would move only about halfway across when the mouse is moved 1 inch. This means the higher the resolution of the monitor, the slower the mouse cursor will move.
It should be noted however, that for most gamers using single monitors with resolutions of 1920x1080 or less, more than 2500 DPI is probably not required and would likely make most games difficult to control. Though if the setup includes multiple high resolution monitors, or is setup with a very large resolution display; a mouse with a DPI higher than 2500 may be beneficial--though it still depends on the preferences of the user.
 Optimal Windows Setting
 Pointer Speed
At a pointer speed setting of 6/11, for every one mouse count your computer will move the pointer one pixel on your screen, a 1:1 ratio. If the mouse pointer speed it set higher or lower than 6, Windows will artificially modify the mouse input. For instance, at the 7/11 mark, your computer moves the cursor 1.5 pixels for every one mouse count and at the 11/11 mark, your pointer moves 3.5 pixels for every one mouse count. This means that not only does Windows skip pixels, it actually can become impossible for the mouse cursor to land on certain columns. Conversely if you have your slider at the 5/11 mark, your pointer will move .75 pixels for every one mouse count. Since computers cannot show 1.5 pixels, it rounds to either 1 or 2 making uneven mouse movements. While a speed setting of 6/11 is the absolute ideal, by keeping it at an even number such as 2/11, 4/11, 8/11 or 10/11 will reduce the impact of Window's manipulation of the input. This is because the odd numbers have to round.
 Mouse Acceleration
In Window's mouse settings, under the pointer speed slider there is a check box called "Enhance pointer precision". This is what windows calls mouse acceleration and it is sometimes enabled by default. Mouse acceleration increases the mouse cursor speed based on the movement velocity of the mouse. In general this means the faster the mouse is moved above a certain threshold, the faster the cursor will respond and vice versa. This again means that Windows is artificially adjusting the input of the mouse.
Some mice have acceleration built into their firmware. For some mice this hardware acceleration can be disabled by configuring the options within the driver software; for others the acceleration within the firmware cannot be disabled and is a permanent feature of the mouse. It's often a good idea to consult online resources or reviews before purchasing a mouse to see for which mice this is true.
While for some games, Quake, certain players prefer to have acceleration enabled; for RTS games it is generally recommended that mouse acceleration be turned off. Having the cursor always respond in the same way for the same mouse input is generally accepted build and further develop muscle memory. Though personal preference may still dictate enabling mouse acceleration.
To turn mouse acceleration off on windows, simply un-check the box. Disabling mouse acceleration on a Mac is not by default possible, though this program can.
 SC2 Specific Settings
Assuming you play StarCraft 2 at the same resolution as your desktop, as of patch 1.4, you can set Starcraft to use the same mouse settings as your normal Windows (this is often easier). To do this, go to Options > Controls and un-check "Enable Mouse Sensitivity". This will make StarCraft use the operating system's pointer speed setting.
If SC2 is not set to disable mouse sensitivity, then note that it will ignore Windows sensitivity settings and utilize whatever the in-game options are set to. However, within SC2 a setting of 50% will still result in skipped pixels.  This is because there are fractions of percentages on the slider in the SC2 options but the displayed value is always rounded to a whole number. The displayed whole number percentage only changes when you hit a new whole number. This means that while the slider may read 50% it may actually be set to 49.5% instead. However windows only recognizes 20 different mouse settings which correspond to 5% intervals so this value is rounded down.
By setting SC2's in game sensitivity to between 51%-54% one can ensure that SC2 will be utilizing a 1:1 ratio exactly.